<!--
{
  "availability" : [

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

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

```
case scaleFit
```

## Discussion

This option fills the remaining space with transparent pixels to maintain aspect ratio.

---

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)