Structure

MLFeatureValue.ImageOption

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

Declaration

struct ImageOption

Topics

Image Options

static let cropAndScale: MLFeatureValue.ImageOption

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

static let cropRect: MLFeatureValue.ImageOption

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

Initializers

init(String)

Creates an image feature option with the given string.

init(rawValue: String)

Creates an image feature option with the given raw-value string.

Relationships

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(cgImage: CGImage, constraint: MLImageConstraint, options: [MLFeatureValue.ImageOption : Any]?)

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

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.

class MLImageConstraint

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