---
title: "vImageCVImageFormat_GetAlphaHint(_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vimagecvimageformat_getalphahint(_:)"
---

# vImageCVImageFormat_GetAlphaHint(_:)

Returns the alpha hint of a Core Video image format.

## Declaration

```swift
func vImageCVImageFormat_GetAlphaHint(_ format: vImageConstCVImageFormat) -> Int32
```

## Parameters

- `format`: The Core Video image format to query.

## Return Value

Return Value Zero if the alpha hint isn’t opaque, or if the hint isn’t set. Nonzero if the alpha hint is fully opaque, even if the encoded values for alpha in the image aren’t 1.0.

## 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_GetAlphaHint(_:): let alphaHint = withUnsafeBytes(of: cvImageFormat) { bytes in     let format = bytes.assumingMemoryBound(         to: vImageConstCVImageFormat.self).first!          return vImageCVImageFormat_GetAlphaHint(format) }

## See Also

### Related Documentation

- [alphaIsOpaqueHint](accelerate/vimagecvimageformat/alphaisopaquehint.md)

### Querying and setting the alpha hint

- [vImageCVImageFormat_SetAlphaHint(_:_:)](accelerate/vimagecvimageformat_setalphahint(_:_:).md)
