]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 1 Oct 2014 20:06:07 +0000 (20:06 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 1 Oct 2014 20:06:07 +0000 (20:06 +0000)
MagickCore/pixel.c

index 8f9ce13ced94e04ed4c30e85de624d2274a1f2b3..164d1db4cae016288083e7263bb4a08266643252 100644 (file)
@@ -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)