<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/VNImageCropAndScaleOption",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "c:@E@VNImageCropAndScaleOption"
  },
  "title" : "VNImageCropAndScaleOption"
}
-->

# VNImageCropAndScaleOption

Options that define how Vision crops and scales an input-image.

```
enum VNImageCropAndScaleOption
```

## 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

### Crop and Scale Options

[`VNImageCropAndScaleOption.centerCrop`](/documentation/Vision/VNImageCropAndScaleOption/centerCrop)

An option that scales the image to fit its shorter side within the input dimensions, while preserving its aspect ratio, and center-crops the image.

[`VNImageCropAndScaleOption.scaleFit`](/documentation/Vision/VNImageCropAndScaleOption/scaleFit)

An option that scales the image to fit its longer side within the input dimensions, while preserving its aspect ratio, and center-crops the image.

[`VNImageCropAndScaleOption.scaleFill`](/documentation/Vision/VNImageCropAndScaleOption/scaleFill)

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

[`VNImageCropAndScaleOption.scaleFitRotate90CCW`](/documentation/Vision/VNImageCropAndScaleOption/scaleFitRotate90CCW)

An option that rotates the image 90 degrees counterclockwise and then scales it, while preserving its aspect ratio, to fit on the long side.

[`VNImageCropAndScaleOption.scaleFillRotate90CCW`](/documentation/Vision/VNImageCropAndScaleOption/scaleFillRotate90CCW)

An option that rotates the image 90 degrees counterclockwise and then scales it to fill the input dimensions.

### Creating a Scale Option

[`init(rawValue:)`](/documentation/Vision/VNImageCropAndScaleOption/init(rawValue:))



---

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)