]> granicus.if.org Git - imagemagick/commitdiff
Add support for -separate option in the compare utility
authorCristy <urban-warrior@imagemagick.org>
Fri, 14 Jul 2017 00:49:58 +0000 (20:49 -0400)
committerCristy <urban-warrior@imagemagick.org>
Fri, 14 Jul 2017 00:49:58 +0000 (20:49 -0400)
MagickWand/compare.c
utilities/compare.1.in
utilities/convert.1.in

index af3e3bc1eb605b875b2922146ea2e5e4408390ca..3648809a6ba7530e2b232624ea8885657acb9941 100644 (file)
@@ -86,6 +86,11 @@ static MagickBooleanType CompareUsage(void)
     **p;
 
   static const char
+    *channel_operators[]=
+    {
+      "-separate            separate an image channel into a grayscale image",
+      (char *) NULL
+    },
     *miscellaneous[]=
     {
       "-channel mask        set the image channel mask",
@@ -190,6 +195,9 @@ static MagickBooleanType CompareUsage(void)
   (void) printf("\nImage Operators:\n");
   for (p=operators; *p != (char *) NULL; p++)
     (void) printf("  %s\n",*p);
+  (void) printf("\nImage Channel Operators:\n");
+  for (p=channel_operators; *p != (char *) NULL; p++)
+    (void) printf("  %s\n",*p);
   (void) printf("\nImage Sequence Operators:\n");
   for (p=sequence_operators; *p != (char *) NULL; p++)
     (void) printf("  %s\n",*p);
@@ -962,6 +970,8 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info,
               ThrowCompareInvalidArgumentException(option,argv[i]);
             break;
           }
+        if (LocaleCompare("separate",option+1) == 0)
+          break;
         if (LocaleCompare("set",option+1) == 0)
           {
             i++;
index 8cba1e503ddeeab66c6775c718dbd74c276f31a3..2a9bfc49d27778d04336b0123ba528d086524cc1 100644 (file)
@@ -76,6 +76,9 @@ Image Operators:
                        lightness rescaling using sigmoidal contrast enhancement
   \-trim                trim image edges
 
+Image Channel Operators:
+  \-separate            separate an image channel into a grayscale image
+
 Image Sequence Operators:
   \-crop geometry       cut out a rectangular region of the image
   \-write filename      write images to this file
index c9880f7c082cf584af43380dc223c9dff5605305..309d782d4b0cf016afb62194b2924720e60c5cdf 100644 (file)
@@ -269,7 +269,6 @@ Image Operators:
   \-white-threshold value
                        force all pixels above the threshold into white
 
-
 Image Channel Operators:
   \-channel-fx expression
                        exchange, extract, or transfer one or more image channels