Transforming with matrix multiplication
Use matrix multiplication to apply color transformations to images.
Overview
Matrix multiplication functions treat source pixels as m-element vectors, with the number of vector elements corresponding to the number of channels. The functions multiply each source value by an n x m matrix to produce an n-element destination pixel. You can use matrix multiplication functions for tasks like converting between color spaces. For example, you can multiply three-channel RGB pixels by a 4 x 3 matrix to generate four-channel CMYK pixels.
Topics
Multiplying multiple-plane pixels by a matrix
Adjusting saturation and applying tone mappingvImageMatrixMultiply_Planar8(_:_:_:_:_:_:_:_:_:)vImageMatrixMultiply_Planar16S(_:_:_:_:_:_:_:_:_:)vImageMatrixMultiply_PlanarF(_:_:_:_:_:_:_:_:)