Contents

vImageCVImageFormat_Create(_:_:_:_:_:)

Creates the description of image encoding in a Core Video pixel buffer from the specified properties.

Declaration

func vImageCVImageFormat_Create(_ imageFormatType: UInt32, _ matrix: UnsafePointer<vImage_ARGBToYpCbCrMatrix>!, _ cvImageBufferChromaLocation: CFString!, _ baseColorspace: CGColorSpace!, _ alphaIsOneHint: Int32) -> Unmanaged<vImageCVImageFormat>!

Parameters

  • imageFormatType:

    The format type of the image. See Pixel Format Identifiers.

  • matrix:

    A Vimage_argbtoypcbcrmatrix that describes the conversion from RGB to the YpCbCr format.

  • cvImageBufferChromaLocation:

    The chrominance location.

  • baseColorspace:

    The color space of RGB and monochrome images. For YpCbCr images, this is the color space of the RGB image before conversion to YpCbCr using the ARGB-to-YpCbCr conversion matrix. The YpCbCr format RGB primaries and transfer function define the color space.

  • alphaIsOneHint:

    A hint that indicates that the function interprets an image with an alpha channel as opaque.

Return Value

A vImageCVImageFormat instance encoded with the function’s parameters.

Discussion

This function derives values that parameters from the image format type don’t specify, such as the number of channels, channel names, and channel descriptions.

See Also

Related Documentation

Creating Core Video image formats