---
title: "init(cropRectangle:)"
framework: createmlcomponents
role: symbol
role_heading: Initializer
path: "createmlcomponents/imagecropper/init(croprectangle:)"
---

# init(cropRectangle:)

Creates an image crop transformer. This transformer is used to crop an image to the cropRectangle.

## Declaration

```swift
init(cropRectangle: CGRect)
```

## Parameters

- `cropRectangle`: A crop rectangle to use. It must always be within the input images’ bounds.
