<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/CoreMLRequest/cropAndScaleAction",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision13CoreMLRequestV18cropAndScaleActionAA09ImageCropefG0Ovp"
  },
  "title" : "cropAndScaleAction"
}
-->

# cropAndScaleAction

An optional setting that tells the Vision algorithm how to scale an input image.

```
var cropAndScaleAction: ImageCropAndScaleAction
```

## Discussion

Scaling an image ensures that the entire image fits into the algorithm’s input image dimensions, which may require a change in aspect ratio. The default value is [`ImageCropAndScaleAction.scaleToFill`](/documentation/Vision/ImageCropAndScaleAction/scaleToFill).

---

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)