<!--
{
  "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/ImageCropAndScaleAction",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision23ImageCropAndScaleActionO"
  },
  "title" : "ImageCropAndScaleAction"
}
-->

# ImageCropAndScaleAction

A scale to apply to an input image before performing a request.

```
enum ImageCropAndScaleAction
```

## Overview

Scaling an image ensures that it fits within the algorithm’s input image
dimensions, which may require a change in aspect ratio. The figure below shows
how each crop-and-scale option transforms the input image:

![A series of six photos that show the effects of applying a center crop, scale fit, scale fill, scale fit rotate 90 degrees counterclockwise, and scale fill rotate 90 degrees counterclockwise option to the original input image.](images/Vision/scale-crop-options@2x.png)

## Topics

### Getting the actions

[`case centerCrop`](/documentation/Vision/ImageCropAndScaleAction/centerCrop)

An action that scales the image and maintains the aspect ratio to fit on the short side and crop centered on the long side.

[`case scaleToFit`](/documentation/Vision/ImageCropAndScaleAction/scaleToFit)

An action that scales to the size the algorithm requires while maintaining the original aspect ratio.

[`case scaleToFill`](/documentation/Vision/ImageCropAndScaleAction/scaleToFill)

An action that scales the image to fill the input dimensions and resizing it, if necessary.

[`case scaleToFitPlus90CCWRotation`](/documentation/Vision/ImageCropAndScaleAction/scaleToFitPlus90CCWRotation)

An action that scales the image and maintains the aspect ratio to fit on the long side, and rotates the image by 90 degrees counter clockwise.

[`case scaleToFillPlus90CCWRotation`](/documentation/Vision/ImageCropAndScaleAction/scaleToFillPlus90CCWRotation)

An action that scales the image and rotates it by 90 degrees counter clockwise.

## Relationships

### Conforms To

[`Encodable`](/documentation/Swift/Encodable)

[`Equatable`](/documentation/Swift/Equatable)

[`Decodable`](/documentation/Swift/Decodable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CaseIterable`](/documentation/Swift/CaseIterable)

---

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)