<!--
{
  "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/init(size:format:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIGraphicsImageRenderer(im)initWithSize:format:"
  },
  "title" : "init(size:format:)"
}
-->

# init(size:format:)

Creates an image renderer with the specified size and format.

```
init(size: CGSize, format: UIGraphicsImageRendererFormat)
```

## Parameters

`size`

The size of images output from the renderer, specified in points.

`format`

A [`UIGraphicsImageRendererFormat`](/documentation/UIKit/UIGraphicsImageRendererFormat) object that encapsulates the format used to create the renderer context.

## Return Value

An initialized renderer.

## Discussion

Use this initializer to create an image renderer when you want to override the default format for the current device. Provide the size of the images you want to create, and an instance of [`UIGraphicsImageRendererFormat`](/documentation/UIKit/UIGraphicsImageRendererFormat) with the required configuration.

---

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)