Operates on an interleaved 8-bit source image, multiplying each pixel by the provided matrix to produce an interleaved 8-bit destination image.

SDKs

- iOS 5.0+
- macOS 10.4+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+

Framework

- Accelerate

## Declaration

## Parameters

`src`

A pointer to a vImage buffer structure that contains the source image.

`dest`

A pointer to a vImage buffer data structure. You are responsible for filling out the

`height`

,`width`

, and`row`

fields of this structure, and for allocating a data buffer of the appropriate size. On return, the data buffer pointed to by this structure contains the destination image data. When you no longer need the data buffer, you must deallocate the memory.Bytes `matrix`

A 1D array whose values represent a 4

`x`

4 matrix. vImage multiplies each source pixel by this matrix to produce a destination pixel.`divisor`

A divisor for normalization after performing the matrix multiplication.

`pre_bias`

A packed array of bias values, one for each source plane. vImage adds the appropriate bias value to each source value before matrix multiplication. If you don't want to apply a preprocessing bias value, pass

`NULL`

.`post_bias`

A packed array of bias values, one for each destination plane. vImage adds the appropriate bias value to each destination value after matrix multiplication. If you don't want to apply a preprocessing bias value, pass

`NULL`

.`flags`

Reserved for future use; pass 0.

## Return Value

`kv`

; otherwise, one of the error codes described in Data Types and Constants.

## Discussion

This function uses 32-bit signed accumulators. If the sum over any matrix column is greater than ±2²³, overflow may occur. Generally speaking, this won't happen because the matrix elements are 16-bit integers, so it would take more than 256 source planes to cause problems.