vImageCVImageFormat_SetColorSpace(_:_:)
Sets the color space of a Core Video image format.
Declaration
func vImageCVImageFormat_SetColorSpace(_ format: vImageCVImageFormat, _ colorspace: CGColorSpace!) -> vImage_ErrorParameters
- format:
The Core Video image format to update.
- colorspace:
The new color space for the format.
Return Value
kvImageNoError; otherwise, one of the error codes in Data Types and Constants.
Discussion
For RGB, indexed, and grayscale images, the color space of a Core Video image format describes the image encoding.
For YpCbCr images, the color space describes the image encoding of the RGB image that’s the result of unapplying the RGB-to-YpCbCr conversion matrix.