relationship between pixel depth ImageType ColorspaceType
Posted: 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?
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?