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

index a69d705d45078e92bedff1c645e30863f462a219..e130bf887429991fd01afa6aa0fed21b1fc00d9d 100644 (file)
@@ -242,8 +242,8 @@ static ssize_t PrintChannelLocations(FILE *file,const Image *image,
       break;
     }
   }
-  (void) FormatLocaleFile(file,"  %s: %.20g (%.20g)",name,target,QuantumScale*
-    target);
+  (void) FormatLocaleFile(file,"  %s: %.*g (%.*g)",name,GetMagickPrecision(),
+    target,GetMagickPrecision(),QuantumScale*target);
   exception=AcquireExceptionInfo();
   n=0;
   for (y=0; y < (ssize_t) image->rows; y++)
index cb89e00beab46be3006f6edbbd8eeb8b7eaa6b04..87395ca59d04dfb6f5603a7b124a079465ceec10 100644 (file)
@@ -141,6 +141,7 @@ static MagickBooleanType IdentifyUsage(void)
       "-matte               store matte channel if the image has one",
       "-monitor             monitor progress",
       "-ping                efficiently determine image attributes",
+      "-precision value     maximum number of significant digits to print",
       "-quiet               suppress all warning messages",
       "-regard-warnings     pay attention to warning messages",
       "-respect-parentheses settings remain in effect until parenthesis boundary",
@@ -773,6 +774,17 @@ WandExport MagickBooleanType IdentifyImageCommand(ImageInfo *image_info,
       {
         if (LocaleCompare("ping",option+1) == 0)
           break;
+        if (LocaleCompare("precision",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 'q':