---
title: "vImageCVImageFormat_CopyConversionMatrix(_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vimagecvimageformat_copyconversionmatrix(_:_:_:)"
---

# vImageCVImageFormat_CopyConversionMatrix(_:_:_:)

Copies an RGB-to-YpCbCr conversion matrix to an image format’s internal matrix.

## Declaration

```swift
func vImageCVImageFormat_CopyConversionMatrix(_ format: vImageCVImageFormat, _ matrix: UnsafeRawPointer, _ inType: vImageMatrixType) -> vImage_Error
```

## Parameters

- `format`: The destination doc://com.apple.accelerate/documentation/Accelerate/vImageCVImageFormat instance.
- `matrix`: The matrix that the function copies to the destination image format.
- `inType`: The type of the matrix.

## Return Value

Return Value kvImageNoError; otherwise, one of the error codes in Data Types and Constants.

## Discussion

Discussion

## See Also

### Querying and setting the conversion matrix

- [vImageCVImageFormat_GetConversionMatrix(_:_:)](accelerate/vimagecvimageformat_getconversionmatrix(_:_:).md)
