<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIGraphicsImageRenderer/image(actions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIGraphicsImageRenderer(im)imageWithActions:"
  },
  "title" : "image(actions:)"
}
-->

# image(actions:)

Creates an image from a set of drawing instructions.

```
func image(actions: (UIGraphicsImageRendererContext) -> Void) -> UIImage
```

## Parameters

`actions`

A [`UIGraphicsImageRenderer.DrawingActions`](/documentation/UIKit/UIGraphicsImageRenderer/DrawingActions) block that, when invoked by the renderer, executes a set of drawing instructions to create the output image.

## Return Value

A [`UIImage`](/documentation/UIKit/UIImage) object created by the supplied drawing actions.

## Discussion

You provide a set of drawing instructions as the block argument to this method, and the method will return the resultant [`UIImage`](/documentation/UIKit/UIImage) object.

You can call this method repeatedly to create multiple images, each of which has identical dimensions and format.

---

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)