<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGBitmapInfo",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@E@CGBitmapInfo"
  },
  "title" : "CGBitmapInfo"
}
-->

# CGBitmapInfo

Component information for a bitmap image.

```
struct CGBitmapInfo
```

## 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`](/documentation/CoreGraphics/CGBitmapInfo/alphaInfoMask)

The alpha information mask. Use this to extract alpha information that specifies whether a bitmap contains an alpha channel and how the alpha channel is generated.

[`floatComponents`](/documentation/CoreGraphics/CGBitmapInfo/floatComponents)

The components of a bitmap are floating-point values.

[`byteOrderMask`](/documentation/CoreGraphics/CGBitmapInfo/byteOrderMask)

The byte ordering of pixel formats.

[`byteOrderDefault`](/documentation/CoreGraphics/CGBitmapInfo/byteOrderDefault)

The default byte order.

[`byteOrder16Little`](/documentation/CoreGraphics/CGBitmapInfo/byteOrder16Little)

16-bit, little endian format.

[`byteOrder32Little`](/documentation/CoreGraphics/CGBitmapInfo/byteOrder32Little)

32-bit, little endian format.

[`byteOrder16Big`](/documentation/CoreGraphics/CGBitmapInfo/byteOrder16Big)

16-bit, big endian format.

[`byteOrder32Big`](/documentation/CoreGraphics/CGBitmapInfo/byteOrder32Big)

32-bit, big endian format.

[`floatInfoMask`](/documentation/CoreGraphics/CGBitmapInfo/floatInfoMask)

### Initializers

[`init(rawValue:)`](/documentation/CoreGraphics/CGBitmapInfo/init(rawValue:))



---

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)