From 4c0c6a3c748ac30045d4844e04f61097b5ae3ec8 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 25 Aug 2018 17:10:29 -0400 Subject: [PATCH] Don't composite alpha channel for -channel RGB --- MagickCore/composite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MagickCore/composite.c b/MagickCore/composite.c index 037e40e15..4875e2455 100644 --- a/MagickCore/composite.c +++ b/MagickCore/composite.c @@ -1513,10 +1513,11 @@ MagickExport MagickBooleanType CompositeImage(Image *image, PixelChannel channel = GetPixelChannelChannel(image,i); PixelTrait traits = GetPixelChannelTraits(image,channel); - PixelTrait source_traits=GetPixelChannelTraits(source_image,channel); + PixelTrait source_traits = GetPixelChannelTraits(source_image,channel); if (traits == UndefinedPixelTrait) continue; - if (channel == AlphaPixelChannel) + if ((channel == AlphaPixelChannel) && + ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0)) { /* Set alpha channel. -- 2.40.0