(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 5 Feb 2013 14:47:44 +0000 (14:47 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 5 Feb 2013 14:47:44 +0000 (14:47 +0000)
MagickWand/operation.c

index bf5c30b91ba987a71fb7e3b2c6243c26ebf277e4..fb769fe724f59a05da703f7c3c1186f27c2327be 100644 (file)
@@ -4609,6 +4609,9 @@ WandExport void CLINoImageOperator(MagickCLI *cli_wand,
         MagickResetIterator(&cli_wand->wand);
         while ( IfMagickTrue(MagickNextImage(&cli_wand->wand)) )
           {
+            Image
+              *next;
+
             if (IfPlusOp) {
               if (LocaleNCompare(arg1,"artifact:",9) == 0)
                 (void) DeleteImageArtifact(_images,arg1+9);
@@ -4618,17 +4621,22 @@ WandExport void CLINoImageOperator(MagickCLI *cli_wand,
                 (void) DeleteImageProperty(_images,arg1);
               break;
             }
-            value=InterpretImageProperties(_image_info,_images,arg2,_exception);
-            if (value == (char *) NULL)
-              CLIWandExceptionBreak(OptionWarning,"InterpretPropertyFailure",
-                    option);
-            if (LocaleNCompare(arg1,"artifact:",9) == 0)
-              (void) SetImageArtifact(_images,arg1+9,value);
-            else if (LocaleNCompare(arg1,"property:",9) == 0)
-              (void) SetImageProperty(_images,arg1+9,value,_exception);
-            else
-              (void) SetImageProperty(_images,arg1,value,_exception);
-            value=DestroyString(value);
+            next=_images;
+            for ( ; next != (Image *) NULL; next=GetNextImageInList(next))
+            {
+              value=InterpretImageProperties(_image_info,next,arg2,_exception);
+              if (value == (char *) NULL)
+                CLIWandExceptionBreak(OptionWarning,"InterpretPropertyFailure",
+                  option);
+              if (LocaleNCompare(arg1,"artifact:",9) == 0)
+                (void) SetImageArtifact(next,arg1+9,value);
+              else
+                if (LocaleNCompare(arg1,"property:",9) == 0)
+                  (void) SetImageProperty(next,arg1+9,value,_exception);
+                else
+                  (void) SetImageProperty(next,arg1,value,_exception);
+              value=DestroyString(value);
+            }
             break;
           }
         MagickResetIterator(&cli_wand->wand);