<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLFeatureValue/ImageOption/init(rawValue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core ML"
    ],
    "preciseIdentifier" : "s:So25MLFeatureValueImageOptiona03rawB0ABSS_tcfc"
  },
  "title" : "init(rawValue:)"
}
-->

# init(rawValue:)

Creates an image feature option key from a raw value string.

```
init(rawValue: String)
```

## Parameters

`rawValue`

A string that represents the name of the image feature option key.

## Discussion

Don’t use this initializer directly. Create an image option key with [`cropAndScale`](/documentation/CoreML/MLFeatureValue/ImageOption/cropAndScale) or [`cropRect`](/documentation/CoreML/MLFeatureValue/ImageOption/cropRect) instead.

---

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)