[GM-help] understanding Magick::ImageType with indexed images
Swiss army knife of image processing
Brought to you by:
bfriesen
|
From: Carnë D. <car...@gm...> - 2013-07-17 20:36:05
|
Hi I'm trying to read indexed images and having some trouble identifying them. Reading the documentation, it seems to me that I can find which ones are indexed by checking Magick::ClassType (PseudoClass vs DirectClass) with classType(). Then I could use type(). From the list here [1], it seems that indexed images would have to either be PaletteType or PaletteMatteType. However, I'm getting some indexed images whose type returns BilevelType and GrayscaleType. How can that be? And how can I distinguish between an indexed image with and without opacity values? On a related note, is it possible to get a string from one of the Magick::ImageType? I would like my program to print error message with a bit more info. Thanks in advance, Carnë [1] http://www.graphicsmagick.org/Magick++/Image.html#type |