From: cristy Date: Wed, 6 Mar 2013 02:07:54 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4138 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31197625e36af96fd614b978b4f723decec1f42d;p=imagemagick --- diff --git a/MagickCore/property.c b/MagickCore/property.c index 0731b4ade..c115c1168 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -188,13 +188,12 @@ MagickExport MagickBooleanType CloneImageProperties(Image *image, %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DefineImageProperty() associates an assignment string of the form -% "key=value" with per-image artifact. It is equivelent to -% SetImageProperity(). +% "key=value" with per-image artifact. It is equivelent to SetImageProperty(). % % The format of the DefineImageProperty method is: % -% MagickBooleanType DefineImageProperty(Image *image, -% const char *property,ExceptionInfo *exception) +% MagickBooleanType DefineImageProperty(Image *image,const char *property, +% ExceptionInfo *exception) % % A description of each parameter follows: % diff --git a/coders/gif.c b/coders/gif.c index 1f1bcd8ac..86a047411 100644 --- a/coders/gif.c +++ b/coders/gif.c @@ -964,7 +964,8 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) #define LSBFirstOrder(x,y) (((y) << 8) | (x)) Image - *image; + *image, + *meta_image; int number_extensionss=0; @@ -1043,6 +1044,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) iterations=1; opacity=(-1); image_count=0; + meta_image=AcquireImage(image_info,exception); /* metadata container */ for ( ; ; ) { count=ReadBlob(image,1,&c); @@ -1097,7 +1099,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) header[count]='\0'; (void) ConcatenateString(&comments,(const char *) header); } - (void) SetImageProperty(image,"comment",comments,exception); + (void) SetImageProperty(meta_image,"comment",comments,exception); comments=DestroyString(comments); break; } @@ -1197,7 +1199,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) header); info=(unsigned char *) RelinquishMagickMemory(info); if (magick == MagickFalse) - (void) SetImageProfile(image,name,profile,exception); + (void) SetImageProfile(meta_image,name,profile,exception); profile=DestroyStringInfo(profile); (void) LogMagickEvent(CoderEvent,GetMagickModule(), " profile name=%s",name); @@ -1263,6 +1265,10 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) global_colormap); ThrowReaderException(CorruptImageError,"NegativeOrZeroImageSize"); } + CloneImageProperties(image,meta_image); + DestroyImageProperties(meta_image); + CloneImageProfiles(image,meta_image); + DestroyImageProfiles(meta_image); /* Inititialize colormap. */ @@ -1361,6 +1367,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) if (status == MagickFalse) break; } + meta_image=DestroyImage(meta_image); global_colormap=(unsigned char *) RelinquishMagickMemory(global_colormap); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(CorruptImageError,"NegativeOrZeroImageSize");