Provide descriptions of Core Graphics image formats for conversions to and from vImage.
Conversions between Core Graphics-backed images and vImage buffers require that you define the Core Graphics image format. The format describes the number of color channels and how they're ordered; the size, in bits, of the color channels; and whether the image data is premultiplied by an alpha value.
You can initialize a Core Graphics image format in either of two ways: by hard-coding values or by deriving the format properties from a
Initialize a Core Graphics Image Format from Hard-Coded Values
The following example shows how you create a Core Graphics image format that describes an image containing four 8-bit channels in the following order: alpha (transparency), red, green, and blue. This combination of properties is referred to as ARGB8888.
v structure created by this code is reusable. You declare it as a variable because it's passed to subsequent vImage functions as an in-out parameter.