]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 19 Aug 2010 22:24:53 +0000 (22:24 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 19 Aug 2010 22:24:53 +0000 (22:24 +0000)
magick/constitute.c

index 393b53bc371e2a4f224056ad349f3b98c7408c70..54d92572741c285412383f07ff1e6196b0807263 100644 (file)
@@ -627,6 +627,7 @@ MagickExport Image *ReadImage(const ImageInfo *image_info,
       timestamp[MaxTextExtent];
 
     const StringInfo
+      *option,
       *profile;
 
     next->taint=MagickFalse;
@@ -771,6 +772,34 @@ MagickExport Image *ReadImage(const ImageInfo *image_info,
     (void) FormatMagickTime(GetBlobProperties(next)->st_ctime,MaxTextExtent,
       timestamp);
     (void) SetImageProperty(next,"date:create",timestamp);
+    option=GetImageOption(image_info,"delay");
+    if (option != (const char *) NULL)
+      {
+        GeometryInfo
+          geometry_info;
+
+        flags=ParseGeometry(option,&geometry_info);
+        if ((flags & GreaterValue) != 0)
+          {
+            if (image->delay > (size_t) floor(geometry_info.rho+0.5))
+              image->delay=(size_t) floor(geometry_info.rho+0.5);
+          }
+        else
+          if ((flags & LessValue) != 0)
+            {
+              if (image->delay < (size_t) floor(geometry_info.rho+0.5))
+                image->ticks_per_second=(ssize_t) floor(geometry_info.sigma+
+                  0.5);
+            }
+          else
+            image->delay=(size_t) floor(geometry_info.rho+0.5);
+        if ((flags & SigmaValue) != 0)
+          image->ticks_per_second=(ssize_t) floor(geometry_info.sigma+0.5);
+      }
+    option=GetImageOption(image_info,"dispose");
+    if (option != (const char *) NULL)
+      image->dispose=(DisposeType) ParseMagickOption(MagickDisposeOptions,
+        MagickFalse,option);
     if (read_info->verbose != MagickFalse)
       (void) IdentifyImage(next,stderr,MagickFalse);
     image=next;