---
title: CGBitmapInfo
framework: coregraphics
role: symbol
role_heading: Structure
path: coregraphics/cgbitmapinfo
---

# CGBitmapInfo

Component information for a bitmap image.

## Declaration

```swift
struct CGBitmapInfo
```

## Overview

Overview Applications that store pixel data in memory using ARGB format must take care in how they read data. If the code is not written correctly, it’s possible to misread the data which leads to colors or alpha that appear wrong. The byte order constants specify the byte ordering of pixel formats. To specify byte ordering, use a bitwise OR operator to combine the appropriate constant with the bitmapInfo parameter.

## Topics

### Constants

- [alphaInfoMask](coregraphics/cgbitmapinfo/alphainfomask.md)
- [floatComponents](coregraphics/cgbitmapinfo/floatcomponents.md)
- [byteOrderMask](coregraphics/cgbitmapinfo/byteordermask.md)
- [byteOrderDefault](coregraphics/cgbitmapinfo/byteorderdefault.md)
- [byteOrder16Little](coregraphics/cgbitmapinfo/byteorder16little.md)
- [byteOrder32Little](coregraphics/cgbitmapinfo/byteorder32little.md)
- [byteOrder16Big](coregraphics/cgbitmapinfo/byteorder16big.md)
- [byteOrder32Big](coregraphics/cgbitmapinfo/byteorder32big.md)
- [floatInfoMask](coregraphics/cgbitmapinfo/floatinfomask.md)

### Initializers

- [init(rawValue:)](coregraphics/cgbitmapinfo/init(rawvalue:).md)
- [init(_:)](coregraphics/cgbitmapinfo/init(_:).md)
- [init(alpha:component:byteOrder:)](coregraphics/cgbitmapinfo/init(alpha:component:byteorder:).md)
- [init(alpha:component:byteOrder:pixelFormat:)](coregraphics/cgbitmapinfo/init(alpha:component:byteorder:pixelformat:).md)
- [init(arrayLiteral:)](coregraphics/cgbitmapinfo/init(arrayliteral:).md)

### Instance Properties

- [alpha](coregraphics/cgbitmapinfo/alpha.md)
- [byteOrder](coregraphics/cgbitmapinfo/byteorder.md)
- [component](coregraphics/cgbitmapinfo/component.md)
- [isEmpty](coregraphics/cgbitmapinfo/isempty.md)
- [pixelFormat](coregraphics/cgbitmapinfo/pixelformat.md)

### Instance Methods

- [contains(_:)](coregraphics/cgbitmapinfo/contains(_:).md)
- [formIntersection(_:)](coregraphics/cgbitmapinfo/formintersection(_:).md)
- [formSymmetricDifference(_:)](coregraphics/cgbitmapinfo/formsymmetricdifference(_:).md)
- [formUnion(_:)](coregraphics/cgbitmapinfo/formunion(_:).md)
- [insert(_:)](coregraphics/cgbitmapinfo/insert(_:).md)
- [intersection(_:)](coregraphics/cgbitmapinfo/intersection(_:).md)
- [isDisjoint(with:)](coregraphics/cgbitmapinfo/isdisjoint(with:).md)
- [isSubset(of:)](coregraphics/cgbitmapinfo/issubset(of:).md)
- [isSuperset(of:)](coregraphics/cgbitmapinfo/issuperset(of:).md)
- [remove(_:)](coregraphics/cgbitmapinfo/remove(_:).md)
- [subtract(_:)](coregraphics/cgbitmapinfo/subtract(_:).md)
- [subtracting(_:)](coregraphics/cgbitmapinfo/subtracting(_:).md)
- [symmetricDifference(_:)](coregraphics/cgbitmapinfo/symmetricdifference(_:).md)
- [union(_:)](coregraphics/cgbitmapinfo/union(_:).md)
- [update(with:)](coregraphics/cgbitmapinfo/update(with:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomReflectable](swift/customreflectable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Examining an image

- [isMask](coregraphics/cgimage/ismask.md)
- [width](coregraphics/cgimage/width.md)
- [height](coregraphics/cgimage/height.md)
- [bitsPerComponent](coregraphics/cgimage/bitspercomponent.md)
- [bitsPerPixel](coregraphics/cgimage/bitsperpixel.md)
- [bytesPerRow](coregraphics/cgimage/bytesperrow.md)
- [colorSpace](coregraphics/cgimage/colorspace.md)
- [alphaInfo](coregraphics/cgimage/alphainfo.md)
- [CGImageAlphaInfo](coregraphics/cgimagealphainfo.md)
- [dataProvider](coregraphics/cgimage/dataprovider.md)
- [decode](coregraphics/cgimage/decode.md)
- [shouldInterpolate](coregraphics/cgimage/shouldinterpolate.md)
- [renderingIntent](coregraphics/cgimage/renderingintent.md)
- [bitmapInfo](coregraphics/cgimage/bitmapinfo.md)
- [utType](coregraphics/cgimage/uttype.md)
