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

# init(size:)

Creates an image renderer for drawing images of the specified size.

## Declaration

```swift
convenience init(size: CGSize)
```

## Parameters

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

## Return Value

Return Value An initialized image renderer.

## Discussion

Discussion Use this initializer to create an image renderer that will draw images of a given size. This renderer uses the default() static method on UIGraphicsImageRendererContext to create its context, thereby selecting parameters that are the most appropriate for the current device.

## See Also

### Initializing an image renderer

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