]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Mon, 3 Oct 2016 11:19:48 +0000 (07:19 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 3 Oct 2016 11:19:48 +0000 (07:19 -0400)
coders/wpg.c

index fbcbcedfb6cd50be67e9cf5396859d4102669d58..ff91ed89815f8909ff7032641979c09b1e837834 100644 (file)
@@ -1184,8 +1184,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
                       flop_image = FlopImage(image, exception);
                       if (flop_image != (Image *) NULL) {
                         DuplicateBlob(flop_image,image);
-                        (void) RemoveLastImageFromList(&image);
-                        AppendImageToList(&image,flop_image);
+                        ReplaceImageInList(&image,flop_image);
                       }
                     }
                   /* flip command */
@@ -1197,8 +1196,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
                       flip_image = FlipImage(image, exception);
                       if (flip_image != (Image *) NULL) {
                         DuplicateBlob(flip_image,image);
-                        (void) RemoveLastImageFromList(&image);
-                        AppendImageToList(&image,flip_image);
+                        ReplaceImageInList(&image,flip_image);
                       }
                     }
                   /* rotate command */
@@ -1211,8 +1209,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
                         0x0FFF), exception);
                       if (rotate_image != (Image *) NULL) {
                         DuplicateBlob(rotate_image,image);
-                        (void) RemoveLastImageFromList(&image);
-                        AppendImageToList(&image,rotate_image);
+                        ReplaceImageInList(&image,rotate_image);
                       }
                     }
                 }
@@ -1379,8 +1376,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
                   flop_image = FlopImage(image, exception);
                   if (flop_image != (Image *) NULL) {
                     DuplicateBlob(flop_image,image);
-                    (void) RemoveLastImageFromList(&image);
-                    AppendImageToList(&image,flop_image);
+                    ReplaceImageInList(&image,flop_image);
                   }
                   /* Try to change CTM according to Flip - I am not sure, must be checked.
                      Tx(0,0)=-1;      Tx(1,0)=0;   Tx(2,0)=0;
@@ -1396,8 +1392,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
                    flip_image = FlipImage(image, exception);
                    if (flip_image != (Image *) NULL) {
                      DuplicateBlob(flip_image,image);
-                     (void) RemoveLastImageFromList(&image);
-                     AppendImageToList(&image,flip_image);
+                     ReplaceImageInList(&image,flip_image);
                     }
                   /* Try to change CTM according to Flip - I am not sure, must be checked.
                      float_matrix Tx(3,3);