From: cristy Date: Sun, 28 Sep 2014 18:48:50 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1966 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6aeeb023536796b4af0b5f5ea370df33953a750e;p=imagemagick --- diff --git a/MagickCore/morphology.c b/MagickCore/morphology.c index 4cd450e64..3fcf15029 100644 --- a/MagickCore/morphology.c +++ b/MagickCore/morphology.c @@ -2710,7 +2710,8 @@ static ssize_t MorphologyPrimitive(const Image *image,Image *morphology_image, if ((traits == UndefinedPixelTrait) || (morphology_traits == UndefinedPixelTrait)) continue; - if (GetPixelReadMask(image,p+center) == 0) + if (((traits & CopyPixelTrait) != 0) || + (GetPixelReadMask(image,p+center) == 0)) { SetPixelChannel(morphology_image,channel,p[center+i],q); continue; @@ -2865,7 +2866,8 @@ static ssize_t MorphologyPrimitive(const Image *image,Image *morphology_image, if ((traits == UndefinedPixelTrait) || (morphology_traits == UndefinedPixelTrait)) continue; - if (GetPixelReadMask(image,p+center) == 0) + if (((traits & CopyPixelTrait) != 0) || + (GetPixelReadMask(image,p+center) == 0)) { SetPixelChannel(morphology_image,channel,p[center+i],q); continue; diff --git a/MagickCore/pixel.h b/MagickCore/pixel.h index d607a3085..444994838 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 | SyncChannels) &~ AlphaChannel) + DefaultChannels = AllChannels } ChannelType; /* must correspond to PixelChannel */ typedef enum