Operates on a set of 16-bit source image planes, multiplying each pixel by the provided matrix to produce a set of 16-bit destination image planes.

SDKs

- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+

Framework

- Accelerate

## Declaration

## Parameters

`srcs`

A pointer to an array of vImage buffer structures, one buffer for each source plane.

`dests`

A pointer to an array of pointers to vImage buffer data structures, one buffer structure for each destination plane. You're responsible for filling out the

`height`

,`width`

, and`row`

fields of these structures, and for allocating data buffers of the appropriate size. On return, the data buffers in these structures contains the destination image data for each plane. When you no longer need the data buffers, you must deallocate the memory.Bytes `src_planes`

The number of source planes.

`dest_planes`

The number of destination planes.

`matrix`

A 1D array whose values represent a matrix with the dimensions

`dest`

_planes `*`

`src`

. vImage multiplies each source pixel by this matrix to produce a destination pixel._planes `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`

The options to use when performing the operation. If you plan to perform your own tiling or use multithreading, pass

`kv`

.Image Do Not Tile

## 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.