index of matte color in palette

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

index of matte color in palette

Post by sanderton »

Does anyone have a quick way of finding the index of the matte color in the palette? I could always loop through the entire color palette to find which index holds the matte color, but I was wondering if there is a C++ API function.

I have a 256 color image, with a transparent color. I'm using matteColor() to get the color, but I'd like to now get the index number from the palette.

User avatar
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

IM does NOT deal with index numbers of a pallette. It generates them as needed.

If you like that you will need to use some tool specific for the format you are working with.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
Post Reply