Instance Method

initWithData:orientation:options:

Creates a handler to be used for performing requests on an image of known orientation, contained in an NSData object.

Declaration

- (instancetype)initWithData:(NSData *)imageData orientation:(CGImagePropertyOrientation)orientation options:(NSDictionary<VNImageOption, id> *)options;

Parameters

imageData

Data containing the image to be used for performing the requests. Image content is immutable.

orientation

The orientation of the input image.

options

An optional dictionary containing VNImageOption keys to auxiliary image data.

Discussion

The intended use cases of this type of initializer include compressed images and network downloads, where a client may receive a JPEG from a website or the cloud.

See Also

Initializing a Handler

- initWithCGImage:options:

Creates a handler to be used for performing requests on Core Graphics images.

- initWithCGImage:orientation:options:

Creates a handler to be used for performing requests on a Core Graphics image with known orientation.

- initWithCIImage:options:

Creates a handler to be used for performing requests on CIImage data.

- initWithCIImage:orientation:options:

Creates a handler to be used for performing requests on CIImage data of a known orientation.

- initWithCVPixelBuffer:options:

Creates a handler to be used for performing requests on a Core Video pixel buffer.

- initWithCVPixelBuffer:orientation:options:

Creates a handler to be used for performing requests on a Core Video pixel buffer of a known orientation.

- initWithData:options:

Creates a handler to be used for performing requests on an image contained in an NSData object.

- initWithURL:options:

Creates a handler to be used for performing requests on an image at the specified URL.

- initWithURL:orientation:options:

Creates a handler to be used for performing requests on an image with known orientation, at the specified URL.

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