]> granicus.if.org Git - imagemagick/commitdiff
bugfix2 for ConvexHull kernel
authoranthony <anthony@git.imagemagick.org>
Thu, 27 May 2010 13:54:14 +0000 (13:54 +0000)
committeranthony <anthony@git.imagemagick.org>
Thu, 27 May 2010 13:54:14 +0000 (13:54 +0000)
magick/morphology.c

index 54d35aed47eb2d4396c99990735d6e035299fa0e..1a71ef91bc08c5b6b6d4bff5896f04f00b6fc888 100644 (file)
@@ -1730,6 +1730,13 @@ MagickExport KernelInfo *AcquireKernelBuiltIn(const KernelInfoType type,
           return(kernel);
         kernel->type = type;
         ExpandKernelInfo(kernel, 45.0);
+        /* append the mirror versions too */
+        new_kernel=ParseKernelArray("3: 1,1,1  1,0,-  -,-,0");
+        if (new_kernel == (KernelInfo *) NULL)
+          return(DestroyKernelInfo(kernel));
+        new_kernel->type = type;
+        ExpandKernelInfo(new_kernel, 45.0);
+        LastKernelInfo(kernel)->next = new_kernel;
         break;
       }
     case SkeletonKernel: