From: cristy Date: Sat, 27 Sep 2014 22:13:06 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1971 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c435681285226a51fbc83bf617b0a1577a5ad745;p=imagemagick --- diff --git a/MagickCore/morphology.c b/MagickCore/morphology.c index 4cd450e64..4163839bb 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 (((morphology_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 (((morphology_traits & CopyPixelTrait) != 0) || + (GetPixelReadMask(image,p+center) == 0)) { SetPixelChannel(morphology_image,channel,p[center+i],q); continue;