Calculates the number of channels (color and alpha) for a given image format.


func vImageCGImageFormat_GetComponentCount(_ format: UnsafePointer<vImage_CGImageFormat>) -> UInt32



A valid vImage_CGImageFormat structure. If format->colorspace is NULL, the format is assumed to be sRGB.

Return Value

The number of color and alpha channels in the image.

See Also

Querying Core Graphics Image Format Attributes

func vImageCGImageFormat_IsEqual(UnsafePointer<vImage_CGImageFormat>!, UnsafePointer<vImage_CGImageFormat>!) -> Bool

Tests two vImage Core Graphics image formats to find out if they're equivalent.

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