---
title: CGImageRetain
framework: coregraphics
role: symbol
role_heading: Function
path: coregraphics/cgimageretain
---

# CGImageRetain

Increments the retain count of a bitmap image.

## Declaration

```occ
extern CGImageRefCGImageRetain(CGImageRef image);
```

## Parameters

- `image`: The image to retain.

## Return Value

Return Value The same image you passed in as the image parameter.

## Discussion

Discussion This function is equivalent to CFRetain, except that it does not cause an error if the image parameter is NULL.

## See Also

### Retaining and releasing images

- [CGImageRelease](coregraphics/cgimagerelease.md)
