---
title: "vImageCVImageFormat_GetChannelDescription(_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vimagecvimageformat_getchanneldescription(_:_:)"
---

# vImageCVImageFormat_GetChannelDescription(_:_:)

Returns the channel description for a particular channel type.

## Declaration

```swift
func vImageCVImageFormat_GetChannelDescription(_ format: vImageConstCVImageFormat, _ type: vImageBufferTypeCode) -> UnsafePointer<vImageChannelDescription>!
```

## Parameters

- `format`: The Core Video image format to query.
- `type`: The type of the channel that you want information about. For example, doc://com.apple.accelerate/documentation/Accelerate/kvImageBufferTypeCode_Luminance.

## Return Value

Return Value A pointer to a vImageChannelDescription structure that contains the channel description.

## Discussion

Discussion The functions that create Core Video image formats, such as vImageCVImageFormat_CreateWithCVPixelBuffer(_:), return a vImageCVImageFormat. The following code shows how you create a vImageConstCVImageFormat representation of a vImageCVImageFormat instance to pass to vImageCVImageFormat_GetChannelDescription(_:_:): let channelDescription = withUnsafeBytes(of: cvImageFormat) { bytes in     let format = bytes.assumingMemoryBound(         to: vImageConstCVImageFormat.self).first!          return vImageCVImageFormat_GetChannelDescription(format,                                                      vImageBufferTypeCode(kvImageBufferTypeCode_Luminance)) }

## See Also

### Related Documentation

- [channelDescription(bufferType:)](accelerate/vimagecvimageformat/channeldescription(buffertype:).md)

### Querying and setting channel information

- [vImageCVImageFormat_GetChannelCount(_:)](accelerate/vimagecvimageformat_getchannelcount(_:).md)
- [vImageCVImageFormat_CopyChannelDescription(_:_:_:)](accelerate/vimagecvimageformat_copychanneldescription(_:_:_:).md)
- [vImageCVImageFormat_GetChannelNames(_:)](accelerate/vimagecvimageformat_getchannelnames(_:).md)
- [vImageChannelDescription](accelerate/vimagechanneldescription.md)
