Instance Property

bitsPerPixel

The number of bits allocated for each pixel in each plane of data.

Declaration

@property(readonly) NSInteger bitsPerPixel;

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 initWithBitmapDataPlanes: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.

See Also

Getting Information About the Image

bitmapFormat

The format of the bitmap image representation.

NSBitmapFormat

Constants representing the various bitmap component formats.

bytesPerPlane

The number of bytes in each plane or channel of data.

bytesPerRow

The minimum number of bytes required to specify a scan line in each data plane.

planar

A Boolean value indicating whether the image data is in a planar configuration.

numberOfPlanes

The number of separate planes into which the image data is organized.

samplesPerPixel

The number of components for each pixel.