]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 28 Sep 2014 18:48:50 +0000 (18:48 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 28 Sep 2014 18:48:50 +0000 (18:48 +0000)
MagickCore/morphology.c
MagickCore/pixel.h

index 4cd450e6424e1308db26327b95413dfa4f02cf9c..3fcf150295b961d713ee8e154fe9075d00f74245 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 (((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;
index d607a30855fae4dfb8a9cdbe550844e96575b759..44499483804405f747a342a7b9899b85e675199e 100644 (file)
@@ -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