<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLFeatureValue/ImageOption/cropAndScale",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Core ML",
      "CoreML"
    ],
    "preciseIdentifier" : "c:@MLFeatureValueImageOptionCropAndScale"
  },
  "title" : "cropAndScale"
}
-->

# cropAndScale

The option you use to crop and scale an image when creating an image feature value.

```
static let cropAndScale: MLFeatureValue.ImageOption
```

## Discussion

Use this value as a dictionary key for the `options` argument of an image-based `MLFeatureValue` initializer. Pair this key with a <doc://com.apple.documentation/documentation/Vision/VNImageCropAndScaleOption> value in the initializer’s `options` dictionary. For example, see [`init(cgImage:pixelsWide:pixelsHigh:pixelFormatType:options:)`](/documentation/CoreML/MLFeatureValue/init(cgImage:pixelsWide:pixelsHigh:pixelFormatType:options:)-1pdp4).

---

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)