Contents

alphaInfo

Returns the alpha channel information for a bitmap image.

Declaration

var alphaInfo: CGImageAlphaInfo { get }

Discussion

The returned value 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 CGImageAlphaInfo.none if the image parameter refers to an image mask.

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

See Also

Examining an image