]> granicus.if.org Git - imagemagick/blobdiff - MagickWand/convert.c
(no commit message)
[imagemagick] / MagickWand / convert.c
index a90593935694364ed729202e1ff9a1f9bc5c40c6..b9d4d1b25e6db310351085c8f45e30b00047bd3e 100644 (file)
 %                Convert an image from one format to another.                 %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                                April 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -216,13 +216,11 @@ static MagickBooleanType ConvertUsage(void)
       "-gaussian-blur geometry",
       "                     reduce image noise and reduce detail levels",
       "-geometry geometry   preferred size or location of the image",
+      "-grayscale method    convert image to grayscale",
       "-identify            identify the format and characteristics of the image",
       "-ift                 implements the inverse discrete Fourier transform (DFT)",
       "-implode amount      implode image pixels about the center",
-      "-interpolative-resize geometry",
-      "                     resize image using interpolation",
       "-lat geometry        local adaptive thresholding",
-      "-layers method       optimize, merge,  or compare image layers",
       "-level value         adjust the level of image contrast",
       "-level-colors color,color",
       "                     level image with the given colors",
@@ -316,6 +314,8 @@ static MagickBooleanType ConvertUsage(void)
       "-clut                apply a color lookup table to the image",
       "-coalesce            merge a sequence of images",
       "-combine             combine a sequence of images",
+      "-compare             mathematically and visually annotate the difference between an image and its reconstruction",
+      "-complex operator    perform complex mathematics on an image sequence",
       "-composite           composite image",
       "-crop geometry       cut out a rectangular region of the image",
       "-deconstruct         break down an image sequence into constituent parts",
@@ -324,6 +324,7 @@ static MagickBooleanType ConvertUsage(void)
       "-flatten             flatten a sequence of images",
       "-fx expression       apply mathematical expression to an image channel(s)",
       "-hald-clut           apply a Hald color lookup table to the image",
+      "-layers method       optimize, merge, or compare image layers",
       "-morph value         morph an image sequence",
       "-mosaic              create a mosaic from an image sequence",
       "-poly terms          build a polynomial from the image sequence and the corresponding",
@@ -392,7 +393,9 @@ static MagickBooleanType ConvertUsage(void)
       "-limit type value    pixel cache resource limit",
       "-loop iterations     add Netscape loop extension to your GIF animation",
       "-mask filename       associate a mask with the image",
+      "-matte               store matte channel if the image has one",
       "-mattecolor color    frame color",
+      "-moments             report image moments",
       "-monitor             monitor progress",
       "-orient type         image orientation",
       "-page geometry       size and location of an image canvas (setting)",
@@ -415,6 +418,7 @@ static MagickBooleanType ConvertUsage(void)
       "-stroke color        graphic primitive stroke color",
       "-strokewidth value   graphic primitive stroke width",
       "-style type          render text with this font style",
+      "-support factor      resize support: > 1.0 is blurry, < 1.0 is sharp",
       "-synchronize         synchronize image to storage device",
       "-taint               declare the image as modified",
       "-texture filename    name of texture to tile onto the image background",
@@ -1046,6 +1050,24 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
               ThrowConvertException(OptionError,"MissingArgument",option);
             break;
           }
+        if (LocaleCompare("compare",option+1) == 0)
+          break;
+        if (LocaleCompare("complex",option+1) == 0)
+          {
+            ssize_t
+              op;
+
+            if (*option == '+')
+              break;
+            i++;
+            if (i == (ssize_t) argc)
+              ThrowConvertException(OptionError,"MissingArgument",option);
+            op=ParseCommandOption(MagickComplexOptions,MagickFalse,argv[i]);
+            if (op < 0)
+              ThrowConvertException(OptionError,"UnrecognizedComplexOperator",
+                argv[i]);
+            break;
+          }
         if (LocaleCompare("compose",option+1) == 0)
           {
             ssize_t
@@ -1659,6 +1681,23 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
                 argv[i]);
             break;
           }
+        if (LocaleCompare("grayscale",option+1) == 0)
+          {
+            ssize_t
+              method;
+
+            if (*option == '+')
+              break;
+            i++;
+            if (i == (ssize_t) (argc-1))
+              ThrowConvertException(OptionError,"MissingArgument",option);
+            method=ParseCommandOption(MagickPixelIntensityOptions,MagickFalse,
+              argv[i]);
+            if (method < 0)
+              ThrowConvertException(OptionError,"UnrecognizedIntensityMethod",
+                argv[i]);
+            break;
+          }
         if (LocaleCompare("green-primary",option+1) == 0)
           {
             if (*option == '+')
@@ -1719,9 +1758,11 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) (argc-1))
               ThrowConvertException(OptionError,"MissingArgument",option);
-            intensity=ParseCommandOption(MagickPixelIntensityOptions,MagickFalse,argv[i]);
+            intensity=ParseCommandOption(MagickPixelIntensityOptions,
+              MagickFalse,argv[i]);
             if (intensity < 0)
-              ThrowConvertException(OptionError,"UnrecognizedPixelIntensityMethod",argv[i]);
+              ThrowConvertException(OptionError,"UnrecognizedIntensityMethod",
+                argv[i]);
             break;
           }
         if (LocaleCompare("intent",option+1) == 0)
@@ -1999,6 +2040,22 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
               ThrowConvertInvalidArgumentException(option,argv[i]);
             break;
           }
+        if (LocaleCompare("metric",option+1) == 0)
+          {
+            ssize_t
+              type;
+
+            if (*option == '+')
+              break;
+            i++;
+            if (i == (ssize_t) argc)
+              ThrowConvertException(OptionError,"MissingArgument",option);
+            type=ParseCommandOption(MagickMetricOptions,MagickTrue,argv[i]);
+            if (type < 0)
+              ThrowConvertException(OptionError,"UnrecognizedMetricType",
+                argv[i]);
+            break;
+          }
         if (LocaleCompare("minimum",option+1) == 0)
           break;
         if (LocaleCompare("mode",option+1) == 0)
@@ -2023,6 +2080,8 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
               ThrowConvertInvalidArgumentException(option,argv[i]);
             break;
           }
+        if (LocaleCompare("moments",option+1) == 0)
+          break;
         if (LocaleCompare("monitor",option+1) == 0)
           break;
         if (LocaleCompare("monochrome",option+1) == 0)