]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 15 Jun 2012 23:21:49 +0000 (23:21 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 15 Jun 2012 23:21:49 +0000 (23:21 +0000)
MagickWand/convert.c
MagickWand/identify.c
MagickWand/mogrify.c
tests/validate.c
utilities/convert.1.in
utilities/identify.1.in
utilities/mogrify.1.in

index 4bb8e332ccbb3bca9fcbc88bd80b310c118a1ec0..b36f0cd06f335f796513599dfbcafe661bf7618a 100644 (file)
@@ -361,6 +361,7 @@ static MagickBooleanType ConvertUsage(void)
       "-encoding type       text encoding type",
       "-endian type         endianness (MSB or LSB) of the image",
       "-family name         render text with this font family",
+      "-features distance   analyze image features (e.g. contrast, correlation)",
       "-fill color          color to use when filling a graphic primitive",
       "-filter type         use this filter when resizing an image",
       "-font name           render text with this font",
@@ -1475,6 +1476,17 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
               ThrowConvertException(OptionError,"MissingArgument",option);
             break;
           }
+        if (LocaleCompare("features",option+1) == 0)
+          {
+            if (*option == '+')
+              break;
+            i++;
+            if (i == (ssize_t) (argc-1))
+              ThrowConvertException(OptionError,"MissingArgument",option);
+            if (IsGeometry(argv[i]) == MagickFalse)
+              ThrowConvertInvalidArgumentException(option,argv[i]);
+            break;
+          }
         if (LocaleCompare("fft",option+1) == 0)
           break;
         if (LocaleCompare("fill",option+1) == 0)
index c6fb6b83ea757868ea56fdcf4c70f8620427cffa..f294c9a936c121c872426edd72be60b6585973ad 100644 (file)
@@ -125,7 +125,7 @@ static MagickBooleanType IdentifyUsage(void)
       "-density geometry    horizontal and vertical density of the image",
       "-depth value         image depth",
       "-extract geometry    extract area from image",
-      "-features distance   display image features (e.g. contrast, correlation)",
+      "-features distance   analyze image features (e.g. contrast, correlation)",
       "-format \"string\"     output formatted image characteristics",
       "-fuzz distance       colors within this distance are considered equal",
       "-gamma value         of gamma correction",
index 0109b20243d785a87a563523f3b743966823d161..4beebb1b8a2a66ce7a47b54ee9546b96c1327c38 100644 (file)
@@ -3473,6 +3473,7 @@ static MagickBooleanType MogrifyUsage(void)
       "-encoding type       text encoding type",
       "-endian type         endianness (MSB or LSB) of the image",
       "-family name         render text with this font family",
+      "-features distance   analyze image features (e.g. contrast, correlation)",
       "-fill color          color to use when filling a graphic primitive",
       "-filter type         use this filter when resizing an image",
       "-font name           render text with this font",
@@ -4575,6 +4576,17 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
               ThrowMogrifyException(OptionError,"MissingArgument",option);
             break;
           }
+        if (LocaleCompare("features",option+1) == 0)
+          {
+            if (*option == '+')
+              break;
+            i++;
+            if (i == (ssize_t) (argc-1))
+              ThrowMogrifyException(OptionError,"MissingArgument",option);
+            if (IsGeometry(argv[i]) == MagickFalse)
+              ThrowMogrifyInvalidArgumentException(option,argv[i]);
+            break;
+          }
         if (LocaleCompare("fill",option+1) == 0)
           {
             if (*option == '+')
index 37cdf4c612806bee4618e777af5aa7183341db9d..fc5aaa1f6fdeeb65b9b684d6059e78602e4dfd52 100644 (file)
@@ -646,10 +646,10 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
           continue;
         }
       difference_image=DestroyImage(difference_image);
-      if ((distortion/QuantumRange) > fuzz)
+      if ((QuantumScale*distortion) > fuzz)
         {
           (void) FormatLocaleFile(stdout,"... fail (with distortion %g).\n",
-            distortion/QuantumRange);
+            QuantumScale*distortion);
           (*fail)++;
           continue;
         }
@@ -858,10 +858,10 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
           continue;
         }
       difference_image=DestroyImage(difference_image);
-      if ((distortion/QuantumRange) > fuzz)
+      if ((QuantumScale*distortion) > fuzz)
         {
           (void) FormatLocaleFile(stdout,"... fail (with distortion %g).\n",
-            distortion/QuantumRange);
+            QuantumScale*distortion);
           (*fail)++;
           continue;
         }
@@ -1035,10 +1035,10 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
           continue;
         }
       difference_image=DestroyImage(difference_image);
-      if ((distortion/QuantumRange) > 0.0)
+      if ((QuantumScale*distortion) > 0.0)
         {
           (void) FormatLocaleFile(stdout,"... fail (with distortion %g).\n",
-            distortion/QuantumRange);
+            QuantumScale*distortion);
           (*fail)++;
           continue;
         }
index ff76a523e0d889b093f7d4ae03e21cecd939192f..a9fc47632ae51aedd2fa33c375dc0229f3282cc7 100644 (file)
@@ -42,6 +42,7 @@ Image Settings:
   \-encoding type       text encoding type
   \-endian type         endianness (MSB or LSB) of the image
   \-family name         render text with this font family
+  \-features distance   analyze image features (e.g. contrast, correlation)
   \-fill color          color to use when filling a graphic primitive
   \-filter type         use this filter when resizing an image
   \-flatten             flatten a sequence of images
index 3c460dd72d14694f8e5eec0cee7bd325a521c8b3..fd17928b5a3f6a176048399b2923bc1136047590 100644 (file)
@@ -20,7 +20,7 @@ Image Settings:
   \-density geometry    horizontal and vertical density of the image
   \-depth value         image depth
   \-extract geometry    extract area from image
-  \-features distance   display image features (e.g. contrast, correlation)
+  \-features distance   analyze image features (e.g. contrast, correlation)
   \-format "string"     output formatted image characteristics
   \-fuzz distance       colors within this distance are considered equal
   \-interlace type      type of image interlacing scheme
index 7ea8e1fd0c1949ca8b51f50b52f3e8fa0a157cab..781aef7404cf0434d81f828fede536c716ae24e7 100644 (file)
@@ -42,6 +42,7 @@ Image Settings:
   \-encoding type       text encoding type
   \-endian type         endianness (MSB or LSB) of the image
   \-family name         render text with this font family
+  \-features distance   analyze image features (e.g. contrast, correlation)
   \-fill color          color to use when filling a graphic primitive
   \-filter type         use this filter when resizing an image
   \-flatten             flatten a sequence of images