]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 16 Nov 2014 01:19:51 +0000 (01:19 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 16 Nov 2014 01:19:51 +0000 (01:19 +0000)
MagickCore/effect.c
MagickCore/pixel.c

index 306132258a121dc3d9a95aaedde987ff8e7569dc..d525422d087eeb093cb1a1929115242c4b94e70e 100644 (file)
@@ -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);
index 34c43bd2660cc0eeb840c3d916188baf7b724711..1d0f5febde26cf2fbba2a281d7c82843dab94742 100644 (file)
@@ -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);