GetPixelCacheTileSize(const Image *,size_t *,size_t *),
GetPixelCacheMethods(CacheMethods *),
ResetPixelCacheEpoch(void),
+ ResetPixelCacheChannels(Image *),
SetPixelCacheMethods(Cache,CacheMethods *);
#if defined(MAGICKCORE_OPENCL_SUPPORT)
% %
% %
% %
-+ R e s e t P i x e l C a c h e E p o c h e %
++ R e s e t P i x e l C a c h e C h a n n e l s %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% ResetPixelCacheChannels() resets the pixel cache channels.
+%
+% The format of the ResetPixelCacheChannels method is:
+%
+% void ResetPixelCacheChannels(Image *)
+%
+% A description of each parameter follows:
+%
+% o image: the image.
+%
+*/
+MagickPrivate void ResetPixelCacheChannels(Image *image)
+{
+ CacheInfo
+ *magick_restrict cache_info;
+
+ assert(image != (const Image *) NULL);
+ assert(image->signature == MagickCoreSignature);
+ assert(image->cache != (Cache) NULL);
+ cache_info=(CacheInfo *) image->cache;
+ assert(cache_info->signature == MagickCoreSignature);
+ cache_info->number_channels=GetPixelChannels(image);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
++ R e s e t P i x e l C a c h e E p o c h %
% %
% %
% %
read_info->stream=stream;
image=ReadImage(read_info,exception);
if (image != (Image *) NULL)
- (void) SyncImagePixelCache(image,exception);
+ {
+ InitializePixelChannelMap(image);
+ ResetPixelCacheChannels(image);
+ }
read_info=DestroyImageInfo(read_info);
return(image);
}