---
title: alphaInfo
framework: coregraphics
role: symbol
role_heading: Instance Property
path: coregraphics/cgcontext/alphainfo
---

# alphaInfo

Returns the alpha information associated with the context, which indicates how a bitmap context handles the alpha component.

## Declaration

```swift
var alphaInfo: CGImageAlphaInfo { get }
```

## Discussion

Discussion Every bitmap context contains an attribute that specifies whether the bitmap contains an alpha component, and how it is generated. The alpha component determines the opacity of a pixel when it is drawn.

## See Also

### Managing a Bitmap Graphics Context

- [bitmapInfo](coregraphics/cgcontext/bitmapinfo.md)
- [bitsPerComponent](coregraphics/cgcontext/bitspercomponent.md)
- [bitsPerPixel](coregraphics/cgcontext/bitsperpixel.md)
- [bytesPerRow](coregraphics/cgcontext/bytesperrow.md)
- [colorSpace](coregraphics/cgcontext/colorspace.md)
- [data](coregraphics/cgcontext/data.md)
- [height](coregraphics/cgcontext/height.md)
- [width](coregraphics/cgcontext/width.md)
- [makeImage()](coregraphics/cgcontext/makeimage().md)
