Type Method

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.

Declaration

+ (instancetype)featureValueWithCGImage:(CGImageRef)cgImage pixelsWide:(NSInteger)pixelsWide pixelsHigh:(NSInteger)pixelsHigh pixelFormatType:(OSType)pixelFormatType options:(NSDictionary<MLFeatureValueImageOption, id> *)options error:(NSError * _Nullable *)error;

See Also

Creating Image Feature Values

+ featureValueWithCGImage:constraint:options:error:

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

Beta
+ 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.

Beta
+ featureValueWithImageAtURL:constraint:options:error:

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

Beta
MLFeatureValueImageOption

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

Beta
MLImageConstraint

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software