Initializer

init(cgImage:constraint:options:)

Wraps an image as a value for a feature, given an image and its constraints.

Declaration

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

See Also

Creating Image Feature Values

init(cgImage: CGImage, pixelsWide: Int, pixelsHigh: Int, pixelFormatType: OSType, options: [MLFeatureValue.ImageOption : Any]?)

Wraps an image as a value for a feature, given an image, its width, and its height, in pixels.

init(imageAt: URL, pixelsWide: Int, pixelsHigh: Int, pixelFormatType: OSType, options: [MLFeatureValue.ImageOption : Any]?)

Wraps an image as a value for a feature, given an image’s URL, and its width and height, in pixels.

init(imageAt: URL, constraint: MLImageConstraint, options: [MLFeatureValue.ImageOption : Any]?)

Wraps an image as a value for a feature, given an image’s URL and constraints.

struct MLFeatureValue.ImageOption

The initializer options to crop and scale an image when you create an image feature value.

class MLImageConstraint

The width, height, and pixel format constraints of an image feature.