<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/ImageCropper/init(cropRectangle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents12ImageCropperV13cropRectangleACSo6CGRectV_tcfc"
  },
  "title" : "init(cropRectangle:)"
}
-->

# init(cropRectangle:)

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

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

## Parameters

`cropRectangle`

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

---

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)