% July 1992 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
Forward declarations.
*/
static MagickBooleanType
- WriteMAGICKImage(const ImageInfo *,Image *);
+ WriteMAGICKImage(const ImageInfo *,Image *,ExceptionInfo *);
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The format of the WriteMAGICKImage method is:
%
% MagickBooleanType WriteMAGICKImage(const ImageInfo *image_info,
-% Image *image)
+% Image *image,ExceptionInfo *exception)
%
% A description of each parameter follows.
%
%
% o image: The image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType WriteMAGICKImage(const ImageInfo *image_info,
- Image *image)
+ Image *image,ExceptionInfo *exception)
{
char
buffer[MaxTextExtent];
image_info->filename);
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
- magick_image=CloneImage(image,0,0,MagickTrue,&image->exception);
+ magick_image=CloneImage(image,0,0,MagickTrue,exception);
if (magick_image == (Image *) NULL)
- ThrowWriterException(ResourceLimitError,image->exception.reason);
+ return(MagickFalse);
write_info=CloneImageInfo(image_info);
*write_info->filename='\0';
(void) CopyMagickString(write_info->magick,"GIF",MaxTextExtent);
(void) CopyMagickString(write_info->magick,"PNM",MaxTextExtent);
length*=3;
}
- blob=ImageToBlob(write_info,magick_image,&length,&image->exception);
+ blob=ImageToBlob(write_info,magick_image,&length,exception);
magick_image=DestroyImage(magick_image);
(void) DestroyImageInfo(write_info);
if (blob == (void *) NULL)
return(MagickFalse);
- status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
+ assert(exception != (ExceptionInfo *) NULL);
+ assert(exception->signature == MagickSignature);
+ status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
(void) WriteBlobString(image,"/*\n");