---
title: cgImage
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiimage/cgimage
---

# cgImage

The underlying Quartz image data.

## Declaration

```swift
var cgImage: CGImage? { get }
```

## Discussion

Discussion If the image data has been purged because of memory constraints, invoking this method forces that data to be loaded back into memory. Reloading the image data may incur a performance penalty. If the UIImage object was initialized using a CIImage object, the value of the property is NULL.

## See Also

### Getting the image data

- [ciImage](uikit/uiimage/ciimage.md)
- [images](uikit/uiimage/images.md)
- [imageAsset](uikit/uiimage/imageasset.md)
