identify: color count is gone

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
imagewinter
Posts: 15
Joined: 2008-02-20T16:03:49-07:00

identify: color count is gone

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: identify: color count is gone

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: identify: color count is gone

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply