From 6aeeb023536796b4af0b5f5ea370df33953a750e Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 28 Sep 2014 18:48:50 +0000 Subject: [PATCH] --- MagickCore/morphology.c | 6 ++++-- MagickCore/pixel.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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 -- 2.40.0