]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 1 Sep 2013 19:08:23 +0000 (19:08 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 1 Sep 2013 19:08:23 +0000 (19:08 +0000)
MagickWand/identify.c
utilities/identify.1.in

index b02cccb8fe83134dd2ae35f3efd4a099a3186777..cb89e00beab46be3006f6edbbd8eeb8b7eaa6b04 100644 (file)
@@ -107,6 +107,7 @@ static MagickBooleanType IdentifyUsage(void)
     },
     *operators[]=
     {
+      "-grayscale method    convert image to grayscale",
       "-negate              replace every pixel with its complementary color ",
       (char *) NULL
     },
@@ -607,6 +608,34 @@ WandExport MagickBooleanType IdentifyImageCommand(ImageInfo *image_info,
               ThrowIdentifyInvalidArgumentException(option,argv[i]);
             break;
           }
+        if (LocaleCompare("grayscale",option+1) == 0)
+          {
+            ssize_t
+              method;
+
+            if (*option == '+')
+              break;
+            i++;
+            if (i == (ssize_t) (argc-1))
+              ThrowIdentifyException(OptionError,"MissingArgument",option);
+            method=ParseCommandOption(MagickPixelIntensityOptions,MagickFalse,
+              argv[i]);
+            if (method < 0)
+              ThrowIdentifyException(OptionError,"UnrecognizedIntensityMethod",
+                argv[i]);
+            break;
+          }
+        if (LocaleCompare("green-primary",option+1) == 0)
+          {
+            if (*option == '+')
+              break;
+            i++;
+            if (i == (ssize_t) (argc-1))
+              ThrowIdentifyException(OptionError,"MissingArgument",option);
+            if (IsGeometry(argv[i]) == MagickFalse)
+              ThrowIdentifyInvalidArgumentException(option,argv[i]);
+            break;
+          }
         ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
       }
       case 'h':
index 6707294e07f9f19e01725cb9c8d9e5fb42c9ab21..efa1b78cc5f65a9dd924bc219eda4f9a3ed25c51 100644 (file)
@@ -56,6 +56,7 @@ Image Settings:
                        virtual pixel access method
 
 Image Operators:
+  \-grayscale method    convert image to grayscale
   \-negate              replace each pixel with its complementary color 
 
 Miscellaneous Options: