Page 1 of 1

identify: color count is gone

Posted: 2008-07-22T03:57:27-07:00
by imagewinter
Version 6.3.7.9

When "identify -verbose" is used in an older version, it would give me information on how many colors is used in the file. But in the above version, it no longer gives me a color count. How do I find out how many colors the picture contains?

By the way, is there a way (or alternative program) to identifying pictorial file information? The identify in ImageMagick is very slow.

Re: identify: color count is gone

Posted: 2008-07-22T10:21:06-07:00
by fmw42
To make identify more efficient add -ping. see http://www.imagemagick.org/Usage/basics/#ping

I believe that color count and histograms are not included if the number of colors is greater than 1024

So for such images you have to limit the colors using -colors 1024 (or less)

convert rose: rose.png

convert rose.png -verbose info:
will not show number of colors

but

convert rose.png -colors 1024 -verbose info:
will show a list of colors and histogram

Re: identify: color count is gone

Posted: 2008-07-23T00:03:58-07:00
by anthony
-ping would not help for a color count for non-pallet images, and then it only returns the palette size, not the actual number of colors!

identify however is not a good method for doing this however.
Extract the 'comment' generated from the histogram: output image...

See http://imagemagick.org/Usage/files/#histogram