*magick_restrict clone_info;
Image
- clone_image;
+ *clone_image;
MagickBooleanType
status;
/*
Clone persistent pixel cache.
*/
- clone_image=(*image);
- clone_info=(CacheInfo *) clone_image.cache;
+ clone_image=CloneImage(image,0,0,MagickTrue,exception);
+ clone_info=(CacheInfo *) clone_image->cache;
image->cache=ClonePixelCache(cache_info);
cache_info=(CacheInfo *) ReferencePixelCache(image->cache);
(void) CopyMagickString(cache_info->cache_filename,filename,MagickPathExtent);
status=ClonePixelCacheRepository(cache_info,clone_info,exception);
*offset+=cache_info->length+page_size-(cache_info->length % page_size);
clone_info=(CacheInfo *) DestroyPixelCache(clone_info);
+ clone_image=DestroyImage(clone_image);
return(status);
}
\f
/*
Initialize persistent pixel cache.
*/
- {
- Image *clone_image=CloneImage(image,0,0,MagickTrue,exception);
- if (clone_image == (Image *) NULL)
- ThrowWriterException(CacheError,"UnableToPersistPixelCache");
- status=PersistPixelCache(clone_image,cache_filename,MagickFalse,&offset,
- exception);
- clone_image=DestroyImage(clone_image);
- }
+ status=PersistPixelCache(image,cache_filename,MagickFalse,&offset,
+ exception);
if (status == MagickFalse)
ThrowWriterException(CacheError,"UnableToPersistPixelCache");
if (GetNextImageInList(image) == (Image *) NULL)