Function

CGDisplayModeCopyPixelEncoding

Returns the pixel encoding of the specified display mode.

Declaration

CFStringRef CGDisplayModeCopyPixelEncoding(CGDisplayModeRef mode);

Parameters

mode

A display mode for which to find the associated pixel encoding.

Return Value

A string representing the pixel encoding of the specified display mode. This string is expressed as a CFString type containing an I/O Kit graphics mode. The caller is responsible for releasing the string.

Discussion

The returned string can be used to determine various aspects of the pixel encoding, such as bits per pixel and bits per sample. For more information, see the header file IOKit/IOGraphicsTypes.h in IOKit.

See Also

Getting Information About a Display Mode

CGDisplayModeGetWidth

Returns the width of the specified display mode.

CGDisplayModeGetHeight

Returns the height of the specified display mode.

CGDisplayModeGetRefreshRate

Returns the refresh rate of the specified display mode.

CGDisplayModeGetIOFlags

Returns the I/O Kit flags of the specified display mode.

CGDisplayModeGetIODisplayModeID

Returns the I/O Kit display mode ID of the specified display mode.

CGDisplayModeIsUsableForDesktopGUI

Returns a Boolean value indicating whether the specified display mode is usable for a desktop graphical user interface.

CGDisplayModeGetTypeID

Returns the type identifier of Quartz display modes.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software