]> granicus.if.org Git - imagemagick/commitdiff
Revert CopyCompositeOp composite patch
authorCristy <urban-warrior@imagemagick.org>
Sun, 23 Jun 2019 19:26:14 +0000 (15:26 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 23 Jun 2019 19:26:14 +0000 (15:26 -0400)
MagickCore/composite.c

index 99e91d1470466eb7e384efbdaec67e35bc989d04..78d6dff92178a586575ffc1ebb8d3883cd4d5f24 100644 (file)
@@ -654,19 +654,18 @@ MagickExport MagickBooleanType CompositeImage(Image *image,
               q+=GetPixelChannels(image);
               continue;
             }
-          for (i=0; i < (ssize_t) GetPixelChannels(source_image); i++)
+          for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
           {
-            PixelChannel channel = GetPixelChannelChannel(source_image,i);
-            PixelTrait source_traits = GetPixelChannelTraits(source_image,
-              channel);
+            PixelChannel channel = GetPixelChannelChannel(image,i);
             PixelTrait traits = GetPixelChannelTraits(image,channel);
-            if (source_traits == UndefinedPixelTrait)
+            PixelTrait source_traits=GetPixelChannelTraits(source_image,
+              channel);
+            if (traits == UndefinedPixelTrait)
               continue;
-            if (traits != UndefinedPixelTrait)
+            if (source_traits != UndefinedPixelTrait)
               SetPixelChannel(image,channel,p[i],q);
-            else
-              if (channel == AlphaPixelChannel)
-                SetPixelChannel(image,channel,OpaqueAlpha,q);
+            else if (channel == AlphaPixelChannel)
+              SetPixelChannel(image,channel,OpaqueAlpha,q);
           }
           p+=GetPixelChannels(source_image);
           q+=GetPixelChannels(image);