Page 1 of 1

Cannot Identify with "-format %[min]"

Posted: 2009-02-20T05:35:49-07:00
by futuramedium
Here is what I get:
C:\>identify -format "%[min]" logo:
1e+037
Similar (wrong) results with "%[max]" and "%[mean]", and, of course, real images instead of "logo:". Version is 6.4.8-7 2009-01-16 Q8 (win32)

Re: Cannot Identify with "-format %[min]"

Posted: 2009-02-20T06:21:28-07:00
by magick
We tried you command with the latest ImageMagick release, 6.4.9-6 and it returned correct results. Perhaps there is a bug in 6.4.8 that has been patched.

Re: Cannot Identify with "-format %[min]"

Posted: 2009-02-21T05:12:43-07:00
by futuramedium
Thank you, but after installing 6.4.9-6 I still get somewhat unexpected results:
C:\>identify -verbose rose:
... (skipped)
Image statistics:
OverAll:
min: 0 (0)
max: 255 (1)
mean: 78.8602 (0.309256)
... (skipped)

C:\>identify -format "%[min]" rose:
0

C:\>identify -format "%[max]" rose:
214

C:\>identify -format "%[mean]" rose:
3.29524

Re: Cannot Identify with "-format %[min]"

Posted: 2009-02-21T11:38:20-07:00
by magick
The identify program is designed to return the image metadata quickly so it does not read the image pixels in most cases. We updated the code to detect when image statistics are required to force identify to read the image pixels. In the mean-time, for a workaround, add +ping to your command line to force the identify program to read the image pixels.