]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 27 Sep 2014 22:13:06 +0000 (22:13 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 27 Sep 2014 22:13:06 +0000 (22:13 +0000)
MagickCore/morphology.c

index 4cd450e6424e1308db26327b95413dfa4f02cf9c..4163839bb12f0f527294cc8bb3cc0dc310b0aabb 100644 (file)
@@ -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;