---
title: CGContextDrawImage
framework: coregraphics
role: symbol
role_heading: Function
path: coregraphics/cgcontextdrawimage
---

# CGContextDrawImage

Draws an image into a graphics context.

## Declaration

```occ
extern void CGContextDrawImage(CGContextRef c, CGRect rect, CGImageRef image);
```

## Parameters

- `c`: The graphics context in which to draw the image.
- `rect`: The location and dimensions in user space of the bounding box in which to draw the image.
- `image`: The image to draw.

## Discussion

Discussion The image is scaled—disproportionately, if necessary—to fit the bounds specified by the rect parameter.

## See Also

### Drawing Images and PDF Content

- [CGContextDrawTiledImage](coregraphics/cgcontextdrawtiledimage.md)
- [drawPDFPage(_:)](coregraphics/cgcontext/drawpdfpage(_:).md)
- [interpolationQuality](coregraphics/cgcontext/interpolationquality.md)
- [CGContextSetInterpolationQuality](coregraphics/cgcontextsetinterpolationquality.md)
- [CGInterpolationQuality](coregraphics/cginterpolationquality.md)
