From: cristy Date: Wed, 1 Oct 2014 20:06:07 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1948 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3219f988547edd669cc24a1087a9abd24a8a834;p=imagemagick --- diff --git a/MagickCore/pixel.c b/MagickCore/pixel.c index 8f9ce13ce..164d1db4c 100644 --- a/MagickCore/pixel.c +++ b/MagickCore/pixel.c @@ -6094,11 +6094,14 @@ MagickExport void SetPixelChannelMask(Image *image, PixelChannel channel=GetPixelChannelChannel(image,i); SetPixelChannelTraits(image,channel, GetChannelBit(channel_mask,channel) == 0 ? CopyPixelTrait : - image->alpha_trait != BlendPixelTrait || (channel == AlphaPixelChannel) ? - UpdatePixelTrait : (PixelTrait) (UpdatePixelTrait | image->alpha_trait)); + (image->alpha_trait == BlendPixelTrait) && + (channel != AlphaPixelChannel) ? (PixelTrait) + (UpdatePixelTrait | BlendPixelTrait) : UpdatePixelTrait); } if (image->storage_class == PseudoClass) SetPixelChannelTraits(image,IndexPixelChannel,CopyPixelTrait); + if (image->alpha_trait != BlendPixelTrait) + SetPixelChannelTraits(image,AlphaPixelChannel,image->alpha_trait); if (image->read_mask != MagickFalse) SetPixelChannelTraits(image,ReadMaskPixelChannel,CopyPixelTrait); if (image->write_mask != MagickFalse)