Function

CGImageGetAlphaInfo

Returns the alpha channel information for a bitmap image.

Declaration

CGImageAlphaInfo CGImageGetAlphaInfo(CGImageRef image);

Parameters

image

The image to examine.

Return Value

A CGImageAlphaInfo constant that specifies (1) whether the bitmap contains an alpha channel, (2) where the alpha bits are located in the image data, and (3) whether the alpha value is premultiplied. For possible values, see Constants. The function returns kCGImageAlphaNone if the image parameter refers to an image mask.

Discussion

The alpha value is what determines the opacity of a pixel when it is drawn.

See Also

Getting Information About an Image

CGImageGetBitmapInfo

Returns the bitmap information for a bitmap image.

CGImageGetBitsPerComponent

Returns the number of bits allocated for a single color component of a bitmap image.

CGImageGetBitsPerPixel

Returns the number of bits allocated for a single pixel in a bitmap image.

CGImageGetBytesPerRow

Returns the number of bytes allocated for a single row of a bitmap image.

CGImageGetColorSpace

Return the color space for a bitmap image.

CGImageGetDataProvider

Returns the data provider for a bitmap image.

CGImageGetDecode

Returns the decode array for a bitmap image.

CGImageGetHeight

Returns the height of a bitmap image.

CGImageGetShouldInterpolate

Returns the interpolation setting for a bitmap image.

CGImageGetRenderingIntent

Returns the rendering intent setting for a bitmap image.

CGImageGetWidth

Returns the width of a bitmap image.

CGImageIsMask

Returns whether a bitmap image is an image mask.

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