]> granicus.if.org Git - imagemagick/commitdiff
https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=3611
authorCristy <mikayla-grace@urban-warrior.org>
Sat, 1 Jun 2019 12:19:35 +0000 (08:19 -0400)
committerCristy <mikayla-grace@urban-warrior.org>
Sat, 1 Jun 2019 12:19:49 +0000 (08:19 -0400)
MagickCore/morphology.c

index cb239cb1d03ecd6808c3291ccaa01bb5c4773564..9a8becc4f08081f04dd85430f4602721a354742b 100644 (file)
@@ -2731,7 +2731,8 @@ static ssize_t MorphologyPrimitive(const Image *image,Image *morphology_image,
             pixel=bias;
             gamma=0.0;
             count=0;
-            if ((image->alpha_trait & BlendPixelTrait) == 0)
+            if (((image->alpha_trait & BlendPixelTrait) == 0) ||
+                ((morphology_traits & BlendPixelTrait) == 0))
               for (v=0; v < (ssize_t) kernel->height; v++)
               {
                 if (!IsNaN(*k))
@@ -2930,7 +2931,8 @@ static ssize_t MorphologyPrimitive(const Image *image,Image *morphology_image,
                  http://www.cs.umd.edu/~djacobs/CMSC426/Convolution.pdf
             */
             k=(&kernel->values[kernel->width*kernel->height-1]);
-            if ((image->alpha_trait & BlendPixelTrait) == 0)
+            if (((image->alpha_trait & BlendPixelTrait) == 0) ||
+                ((morphology_traits & BlendPixelTrait) == 0))
               {
                 /*
                   No alpha blending.