bitsPerPixel
The number of bits allocated for each pixel in each plane of data.
Declaration
var bitsPerPixel: Int { get }Discussion
This number is normally equal to the number of bits per sample or, if the data is in meshed configuration, the number of bits per sample times the number of samples per pixel. It can be explicitly set to another value (in init(bitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:)) in case extra memory is allocated for each pixel. This may be the case, for example, if pixel data is aligned on byte boundaries.