---
title: decode
framework: coregraphics
role: symbol
role_heading: Instance Property
path: coregraphics/cgimage/decode
---

# decode

Returns the decode array for a bitmap image.

## Declaration

```swift
var decode: UnsafePointer<CGFloat>? { get }
```

## Discussion

Discussion For a bitmap image or image mask, for each color component in the source color space, the decode array contains a pair of values denoting the upper and lower limits of a range. When the image is rendered, a linear transform maps the original component value into a relative number, within the designated range, that is appropriate for the destination color space. If remapping of the image’s color values is not allowed, the returned value will be NULL.

## 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)
- [shouldInterpolate](coregraphics/cgimage/shouldinterpolate.md)
- [renderingIntent](coregraphics/cgimage/renderingintent.md)
- [bitmapInfo](coregraphics/cgimage/bitmapinfo.md)
- [CGBitmapInfo](coregraphics/cgbitmapinfo.md)
- [utType](coregraphics/cgimage/uttype.md)
