]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 6 Mar 2013 02:07:54 +0000 (02:07 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 6 Mar 2013 02:07:54 +0000 (02:07 +0000)
MagickCore/property.c
coders/gif.c

index 0731b4ade820ecbf1a7947f9a806c8f5bb831432..c115c11689acbc51acfab3d6f4bea7b557d19a1e 100644 (file)
@@ -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:
 %
index 1f1bcd8acdea61fa1f54847a245fe7f1dc903848..86a04741142310d438082d370a19efdbee18c838 100644 (file)
@@ -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");