From 9481266f1911c0a05b926975066547c87baf1cf7 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 12 Feb 2017 08:23:32 -0500 Subject: [PATCH] ... --- MagickCore/pixel.c | 15 ++++++++------- MagickCore/pixel.h | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/MagickCore/pixel.c b/MagickCore/pixel.c index 0458cfdde..ecfe063eb 100644 --- a/MagickCore/pixel.c +++ b/MagickCore/pixel.c @@ -6290,14 +6290,15 @@ MagickExport ChannelType SetPixelChannelMask(Image *image, SetPixelChannelTraits(image,channel,CopyPixelTrait); continue; } + SetPixelChannelTraits(image,channel,UpdatePixelTrait); + continue; + } + if (image->alpha_trait != UndefinedPixelTrait) + { + SetPixelChannelTraits(image,channel,(const PixelTrait) + (UpdatePixelTrait | BlendPixelTrait)); + continue; } - else - if (image->alpha_trait != UndefinedPixelTrait) - { - SetPixelChannelTraits(image,channel,(const PixelTrait) - (UpdatePixelTrait | BlendPixelTrait)); - continue; - } SetPixelChannelTraits(image,channel,UpdatePixelTrait); } if (image->storage_class == PseudoClass) diff --git a/MagickCore/pixel.h b/MagickCore/pixel.h index bd8707d95..214787323 100644 --- a/MagickCore/pixel.h +++ b/MagickCore/pixel.h @@ -60,7 +60,7 @@ typedef enum RGBChannels = 0x0200, /* set alpha from grayscale mask in RGB */ GrayChannels = 0x0400, SyncChannels = 0x20000, /* channels modified as a single unit */ - DefaultChannels = AllChannels + DefaultChannels = (AllChannels &~ AlphaChannel) } ChannelType; /* must correspond to PixelChannel */ typedef enum -- 2.40.0