---
title: "init(cgImage:orientation:constraint:options:)"
framework: coreml
role: symbol
role_heading: Initializer
path: "coreml/mlfeaturevalue/init(cgimage:orientation:constraint:options:)-1djlw"
---

# init(cgImage:orientation:constraint:options:)

Construct image feature value from CGImage w/ specified orientation, using the size and type information required by feature description

## Declaration

```swift
convenience init(cgImage: CGImage, orientation: CGImagePropertyOrientation, constraint: MLImageConstraint, options: [MLFeatureValue.ImageOption : Any]? = nil) throws
```
