% %
% %
% %
+% S y n c I m a g e P i x e l C a c h e %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% SyncImagePixelCache() saves the image pixels to the in-memory or disk cache.
+% The method returns MagickTrue if the pixel region is flushed, otherwise
+% MagickFalse.
+%
+% The format of the SyncImagePixelCache() method is:
+%
+% MagickBooleanType SyncImagePixelCache(Image *image,
+% ExceptionInfo *exception)
+%
+% A description of each parameter follows:
+%
+% o image: the image.
+%
+% o exception: return any errors or warnings in this structure.
+%
+*/
+MagickExport MagickBooleanType SyncImagePixelCache(Image *image,
+ ExceptionInfo *exception)
+{
+ CacheInfo
+ *cache_info;
+
+ assert(image != (Image *) NULL);
+ assert(exception != (ExceptionInfo *) NULL);
+ cache_info=(CacheInfo *) GetImagePixelCache(image,MagickTrue,exception);
+ return(cache_info == (CacheInfo *) NULL ? MagickFalse : MagickTrue);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+ W r i t e P i x e l C a c h e M e t a c o n t e n t %
% %
% %
ExceptionInfo *),
PersistPixelCache(Image *,const char *,const MagickBooleanType,
MagickOffsetType *,ExceptionInfo *),
- SyncAuthenticPixels(Image *,ExceptionInfo *);
+ SyncAuthenticPixels(Image *,ExceptionInfo *),
+ SyncImagePixelCache(Image *,ExceptionInfo *);
extern MagickExport MagickSizeType
GetImageExtent(const Image *);
const ColorspaceType colorspace,ExceptionInfo *exception)
{
image->colorspace=colorspace;
- return(MagickTrue);
+ return(SyncImagePixelCache(image,exception));
}
\f
/*
case UndefinedAlphaChannel:
break;
}
- return(status);
+ if (status == MagickFalse)
+ return(status);
+ return(SyncImagePixelCache(image,exception));
}
\f
/*
const ClassType storage_class,ExceptionInfo *exception)
{
image->storage_class=storage_class;
- return(MagickTrue);
+ return(SyncImagePixelCache(image,exception));
}
\f
/*
return(MagickFalse);
image->columns=columns;
image->rows=rows;
- return(MagickTrue);
+ return(SyncImagePixelCache(image,exception));
}
\f
/*
if (attribute_flag[0] == 0)
argument_list[0].string_reference=(char *) NULL;
(void) ColorDecisionListImage(image,
- argument_list[0].string_reference);
+ argument_list[0].string_reference,exception);
break;
}
case 127: /* AutoGamma */