<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 8.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImageCVImageFormat_GetAlphaHint(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vImageCVImageFormat_GetAlphaHint"
  },
  "title" : "vImageCVImageFormat_GetAlphaHint(_:)"
}
-->

# vImageCVImageFormat_GetAlphaHint(_:)

Returns the alpha hint of a Core Video image format.

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

## Parameters

`format`

The Core Video image format to query.

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

The functions that create Core Video image formats, such as [`vImageCVImageFormat_CreateWithCVPixelBuffer(_:)`](/documentation/Accelerate/vImageCVImageFormat_CreateWithCVPixelBuffer(_:)), return a [`vImageCVImageFormat`](/documentation/Accelerate/vImageCVImageFormat). The following code shows how you create a [`vImageConstCVImageFormat`](/documentation/Accelerate/vImageConstCVImageFormat) representation of a [`vImageCVImageFormat`](/documentation/Accelerate/vImageCVImageFormat) instance to pass to [`vImageCVImageFormat_GetAlphaHint(_:)`](/documentation/Accelerate/vImageCVImageFormat_GetAlphaHint(_:)):

```swift
let alphaHint = withUnsafeBytes(of: cvImageFormat) { bytes in
    let format = bytes.assumingMemoryBound(
        to: vImageConstCVImageFormat.self).first!
    
    return vImageCVImageFormat_GetAlphaHint(format)
}
```

## See Also

[`alphaIsOpaqueHint`](/documentation/Accelerate/vImageCVImageFormat/alphaIsOpaqueHint)

The alpha hint of the Core Video image format.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)