---
title: channelCount
framework: accelerate
role: symbol
role_heading: Instance Property
path: accelerate/vimagecvimageformat/channelcount
---

# channelCount

The number of channels, including alpha, for the Core Video image format.

## Declaration

```swift
var channelCount: UInt32 { get }
```

## Discussion

Discussion For example, the following code prints the number of channels in a kCVPixelFormatType_420YpCbCr8Planar Core Video image format: let cvImageFormat = vImageCVImageFormat.make(     format: .format420YpCbCr8Planar,     matrix: kvImage_ARGBToYpCbCrMatrix_ITU_R_709_2.pointee,     chromaSiting: .center,     colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!,     alphaIsOpaqueHint: true)!

// Prints "channelCount: 3". print("channelCount: \(cvImageFormat.channelCount)")

## See Also

### Related Documentation

- [vImageCVImageFormat_GetChannelCount(_:)](accelerate/vimagecvimageformat_getchannelcount(_:).md)

### Inspecting a Core Video image format’s properties

- [channels](accelerate/vimagecvimageformat/channels.md)
- [channelDescription(bufferType:)](accelerate/vimagecvimageformat/channeldescription(buffertype:).md)
- [formatCode](accelerate/vimagecvimageformat/formatcode.md)
- [chromaSiting](accelerate/vimagecvimageformat/chromasiting-swift.property.md)
- [colorSpace](accelerate/vimagecvimageformat/colorspace.md)
- [alphaIsOpaqueHint](accelerate/vimagecvimageformat/alphaisopaquehint.md)
