Instance Property

bitsPerPixel

Returns the bits per pixel of a bitmap context.

Declaration

var bitsPerPixel: Int { get }

Parameters

context

The bitmap context to examine.

Return Value

The number of bits per pixel in the specified context, or 0 if the context is not a bitmap context.

See Also

Managing a Bitmap Graphics Context

var bitmapInfo: CGBitmapInfo

Obtains the bitmap information associated with a bitmap graphics context.

var alphaInfo: CGImageAlphaInfo

Returns the alpha information associated with the context, which indicates how a bitmap context handles the alpha component.

var bitsPerComponent: Int

Returns the bits per component of a bitmap context.

var bytesPerRow: Int

Returns the bytes per row of a bitmap context.

var colorSpace: CGColorSpace?

Returns the color space of a bitmap context.

var data: UnsafeMutableRawPointer?

Returns a pointer to the image data associated with a bitmap context.

var height: Int

Returns the height in pixels of a bitmap context.

var width: Int

Returns the width in pixels of a bitmap context.

func makeImage() -> CGImage?

Creates and returns a CGImage from the pixel data in a bitmap graphics context.

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