File ImageMagick-morphology-EdgeIn.patch of Package ImageMagick.19146

Index: ImageMagick-7.0.8-12/MagickCore/morphology.c
===================================================================
--- ImageMagick-7.0.8-12.orig/MagickCore/morphology.c	2018-09-23 14:06:46.000000000 +0200
+++ ImageMagick-7.0.8-12/MagickCore/morphology.c	2018-10-09 18:25:12.354380404 +0200
@@ -2880,13 +2880,23 @@ static ssize_t MorphologyPrimitive(const
         minimum=(double) QuantumRange;
         switch (method)
         {
-          case ConvolveMorphology: pixel=bias; break;
+          case ConvolveMorphology:
+          {
+            pixel=bias;
+            break;
+          }
           case DilateMorphology:
           case ErodeIntensityMorphology:
           {
             pixel=0.0;
             break;
           }
+          case HitAndMissMorphology:
+          case ErodeMorphology:
+          {
+            pixel=QuantumRange;
+            break;
+          }
           default:
           {
             pixel=(double) p[center+i];
Index: ImageMagick-7.0.8-12/MagickCore/composite.c
===================================================================
--- ImageMagick-7.0.8-12.orig/MagickCore/composite.c	2018-09-23 14:06:46.000000000 +0200
+++ ImageMagick-7.0.8-12/MagickCore/composite.c	2018-10-09 18:25:12.350380383 +0200
@@ -1613,6 +1613,11 @@ MagickExport MagickBooleanType Composite
                   Da*GetPixelIntensity(image,q) ? Sa : Da;
                 break;
               }
+              case DifferenceCompositeOp:
+              {
+                pixel=QuantumRange*fabs(Sa-Da);
+                break;
+              }
               case LightenIntensityCompositeOp:
               {
                 pixel=Sa*GetPixelIntensity(source_image,p) >
openSUSE Build Service is sponsored by