diff --git a/MagickCore/identify.c b/MagickCore/identify.c
index a69d705..e130bf8 100644
--- a/MagickCore/identify.c
+++ b/MagickCore/identify.c
@@ -242,8 +242,8 @@
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++)
diff --git a/MagickWand/identify.c b/MagickWand/identify.c
index cb89e00..87395ca 100644
--- a/MagickWand/identify.c
+++ b/MagickWand/identify.c
@@ -141,6 +141,7 @@
"-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 @@
{
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':