vImageCVImageFormat
A mutable description of image encoding in a Core Video pixel buffer.
Declaration
class vImageCVImageFormatMentioned in
Overview
The vImage library uses the information in an image format to construct vImageConverter instances that convert to and from images encoded with the format. The format stores a description of the pixels in the image, such as color representation, bit depth, and number of channels.
A vImageCVImageFormat instance is capable of holding an incomplete encoding representation. In this case, the vImageConverter_CreateForCGToCVImageFormat(_:_:_:_:_:) and vImageConverter_CreateForCVToCGImageFormat(_:_:_:_:_:) functions return an error code that indicates what information is missing.
- kvImageCVImageFormat_ConversionMatrix
Use vImageCVImageFormat_CopyConversionMatrix(_:_:_:) to add the missing conversion matrix.
- kvImageCVImageFormat_ChromaSiting
Use vImageCVImageFormat_SetChromaSiting(_:_:) to add the missing chrominance siting information.
- kvImageCVImageFormat_ColorSpace
Use vImageCVImageFormat_SetColorSpace(_:_:) to add the missing color space that contains primaries and transfer function.
Reuse a vImageCVImageFormat instance with other Core Video pixel buffers of the same format, such as other frames from the same movie.
Topics
Creating a Core Video image format
make(buffer:)make(format:matrix:chromaSiting:colorSpace:alphaIsOpaqueHint:)make(format:colorSpace:alphaIsOpaqueHint:)
Inspecting a Core Video image format’s properties
channelCountchannelschannelDescription(bufferType:)formatCodechromaSitingcolorSpacealphaIsOpaqueHint