]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=7&t=32770
authorCristy <urban-warrior@imagemagick.org>
Wed, 27 Sep 2017 21:58:55 +0000 (17:58 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 27 Sep 2017 21:58:55 +0000 (17:58 -0400)
PerlMagick/Magick.xs
PerlMagick/quantum/quantum.xs.in

index edc0c3dc53560218a3e19db6454011b4e0c61ffc..f5f06c436175bf0d078a7f29f3ce50b38cc4a44a 100644 (file)
@@ -14618,6 +14618,9 @@ Write(ref,...)
           PackageName);
         goto PerlException;
       }
+    scene=0;
+    for (next=image; next; next=next->next)
+      next->scene=scene++;
     package_info=ClonePackageInfo(info,exception);
     if (items == 2)
       SetAttribute(aTHX_ package_info,NULL,"filename",ST(1),exception);
@@ -14628,12 +14631,8 @@ Write(ref,...)
             exception);
     (void) CopyMagickString(filename,package_info->image_info->filename,
       MagickPathExtent);
-    scene=0;
     for (next=image; next; next=next->next)
-    {
       (void) CopyMagickString(next->filename,filename,MagickPathExtent);
-      next->scene=scene++;
-    }
     *package_info->image_info->magick='\0';
     SetImageInfo(package_info->image_info,(unsigned int)
       GetImageListLength(image),exception);
index c018990320eb7beaf0c58b6fef99ae0b9f82bfa8..31cd1b49d36a943245bb58d5ccfee661a7ca1af3 100644 (file)
@@ -14617,6 +14617,9 @@ Write(ref,...)
           PackageName);
         goto PerlException;
       }
+    scene=0;
+    for (next=image; next; next=next->next)
+      next->scene=scene++;
     package_info=ClonePackageInfo(info,exception);
     if (items == 2)
       SetAttribute(aTHX_ package_info,NULL,"filename",ST(1),exception);
@@ -14627,12 +14630,8 @@ Write(ref,...)
             exception);
     (void) CopyMagickString(filename,package_info->image_info->filename,
       MagickPathExtent);
-    scene=0;
     for (next=image; next; next=next->next)
-    {
       (void) CopyMagickString(next->filename,filename,MagickPathExtent);
-      next->scene=scene++;
-    }
     *package_info->image_info->magick='\0';
     SetImageInfo(package_info->image_info,(unsigned int)
       GetImageListLength(image),exception);