relationship between pixel depth ImageType ColorspaceType

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
paolopazziani
Posts: 2
Joined: 2013-04-11T00:03:18-07:00
Authentication code: 6789

relationship between pixel depth ImageType ColorspaceType

Post by paolopazziani » 2013-04-11T00:50:08-07:00

Hi, I would like to know if there is a way to know the total number of channels in an image or the total depth per pixel.
I tried to use the following method:
- // Image depth (bits allocated to red / green / blue components)
     size_t depth (void) const;
but only provides the depth of the single channel and not the entire pixel.
I also tried to make a match between total depth and ImageType or with ColorspaceType, but finding some ambiguous situations in which 32 bit-per-pixel BGRA images appear to have ImageType = PaletteType.
Someone can give me an explanation of the various possibilities or direct me to a comprehensive documentation on the subject?

Post Reply