From 4a60519527fc1cf925d37f93aac021655ee43314 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 23 Jun 2019 15:26:14 -0400 Subject: [PATCH] Revert CopyCompositeOp composite patch --- MagickCore/composite.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/MagickCore/composite.c b/MagickCore/composite.c index 99e91d147..78d6dff92 100644 --- a/MagickCore/composite.c +++ b/MagickCore/composite.c @@ -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); -- 2.40.0