From: cristy Date: Sun, 16 Nov 2014 01:19:51 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1733 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2835003f7a191b2db59d0ace1e332e4103d29b6f;p=imagemagick --- diff --git a/MagickCore/effect.c b/MagickCore/effect.c index 306132258..d525422d0 100644 --- a/MagickCore/effect.c +++ b/MagickCore/effect.c @@ -3241,6 +3241,11 @@ MagickExport Image *ShadeImage(const Image *image,const MagickBooleanType gray, SetPixelChannel(shade_image,channel,center[i],q); continue; } + if ((traits & UpdatePixelTrait) == 0) + { + SetPixelChannel(shade_image,channel,center[i],q); + continue; + } if (gray != MagickFalse) { SetPixelChannel(shade_image,channel,ClampToQuantum(shade),q); diff --git a/MagickCore/pixel.c b/MagickCore/pixel.c index 34c43bd26..1d0f5febd 100644 --- a/MagickCore/pixel.c +++ b/MagickCore/pixel.c @@ -6157,13 +6157,13 @@ MagickExport void SetPixelChannelMask(Image *image, PixelChannel channel=GetPixelChannelChannel(image,i); SetPixelChannelTraits(image,channel, GetChannelBit(channel_mask,channel) == 0 ? CopyPixelTrait : - (image->alpha_trait != UndefinedPixelTrait) && - (channel != AlphaPixelChannel) ? (PixelTrait) + (image->alpha_trait == BlendPixelTrait) && + (channel != AlphaPixelChannel) ? (PixelTrait) (UpdatePixelTrait | BlendPixelTrait) : UpdatePixelTrait); } if (image->storage_class == PseudoClass) SetPixelChannelTraits(image,IndexPixelChannel,CopyPixelTrait); - if (image->alpha_trait == UndefinedPixelTrait) + if (image->alpha_trait != BlendPixelTrait) SetPixelChannelTraits(image,AlphaPixelChannel,image->alpha_trait); if (image->read_mask != MagickFalse) SetPixelChannelTraits(image,ReadMaskPixelChannel,CopyPixelTrait);