<!--
{
  "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/CGContextDrawImage",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGContextDrawImage"
  },
  "title" : "CGContextDrawImage"
}
-->

# CGContextDrawImage

Draws an image into a graphics context.

```
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

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

---

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)