Identifying Images with Indexed Color Format

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
roscko
Posts: 1
Joined: 2011-10-31T10:51:26-07:00
Authentication code: 8675308

Identifying Images with Indexed Color Format

Post by roscko »

I am simply trying to filter out images that have an indexed color format. I was hoping there was some property I could pull from running an identify but haven't had any luck. I have tried checking the unique colors to see if we fall under 256 but this returns false positives. Does anyone know of a way to determine this through an identify (verbose or otherwise)?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Identifying Images with Indexed Color Format

Post by fmw42 »

convert logo: -type palette -format "%r" info:
PseudoClassRGB


Or get the Type from the verbose info: which will say palette or palettematte. That will mean pseudocolor.
Post Reply