From: cristy Date: Sun, 1 Sep 2013 23:53:47 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3347 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1b1486951e2507b7c645831dbcc8f10428d8917;p=imagemagick --- diff --git a/MagickCore/identify.c b/MagickCore/identify.c index a69d705d4..e130bf887 100644 --- a/MagickCore/identify.c +++ b/MagickCore/identify.c @@ -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++) diff --git a/MagickWand/identify.c b/MagickWand/identify.c index cb89e00be..87395ca59 100644 --- a/MagickWand/identify.c +++ b/MagickWand/identify.c @@ -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':