---
title: "init(size:format:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uigraphicsimagerenderer/init(size:format:)"
---

# init(size:format:)

Creates an image renderer with the specified size and format.

## Declaration

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

## Parameters

- `size`: The size of images output from the renderer, specified in points.
- `format`: A doc://com.apple.uikit/documentation/UIKit/UIGraphicsImageRendererFormat object that encapsulates the format used to create the renderer context.

## Return Value

Return Value An initialized renderer.

## Discussion

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 with the required configuration.

## See Also

### Initializing an image renderer

- [init(bounds:format:)](uikit/uigraphicsimagerenderer/init(bounds:format:).md)
- [init(size:)](uikit/uigraphicsimagerenderer/init(size:).md)
