CGDisplayBitsPerPixel

Returns the number of bits used to represent a pixel in the framebuffer.

Declaration

size_t CGDisplayBitsPerPixel (
   CGDirectDisplayID display
);

Parameters

display

The identifier of the display to be accessed.

Return Value

The number of bits used to represent a pixel in the framebuffer.

Overview

This deprecated function allows an application to retrieve the number of bits used to represent a pixel in the framebuffer. Starting in OS X v10.6 the CGDisplayModeCopyPixelEncoding should be used because it returns to the user the I/O Kit Graphics Mode, which can be used to determine the bits per pixel, as well as their encoding. This can prevent treating display modes with different encodings, but a similar total number of bits per pixel, in the same way.

See Also

Retrieving Display Parameters

CGDisplayBounds

Returns the bounds of a display in the global display coordinate space.

CGDisplayPixelsHigh

Returns the display height in pixel units.

CGDisplayPixelsWide

Returns the display width in pixel units.

CGDisplayBitsPerSample

Returns the number of bits used to represent a pixel component in the framebuffer.

CGDisplaySamplesPerPixel

Returns the number of color components used to represent a pixel.

CGDisplayBytesPerRow

Returns the number of bytes per row in a display.