Cannot Identify with "-format %[min]"

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
futuramedium

Cannot Identify with "-format %[min]"

Post 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)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
futuramedium

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

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
Post Reply