Type Method

featureValueWithCGImage:constraint:options:error:

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

Declaration

+ (instancetype)featureValueWithCGImage:(CGImageRef)cgImage constraint:(MLImageConstraint *)constraint options:(NSDictionary<MLFeatureValueImageOption, id> *)options error:(NSError * _Nullable *)error;

See Also

Creating Image Feature Values

+ featureValueWithCGImage:pixelsWide:pixelsHigh:pixelFormatType:options:error:

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

+ featureValueWithImageAtURL:pixelsWide:pixelsHigh:pixelFormatType:options:error:

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

+ featureValueWithImageAtURL:constraint:options:error:

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

MLFeatureValueImageOption

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

MLImageConstraint

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