Type Method

initWithOptions:

Initializes a context without a specific rendering destination, using the specified options.

Declaration

iOS, macOS, Mac Catalyst, tvOS
+ (CIContext *)contextWithOptions:(NSDictionary<CIContextOption, id> *)options;
iOS, macOS, Mac Catalyst, tvOS
- (instancetype)initWithOptions:(NSDictionary<CIContextOption, id> *)options;

Parameters

options

A dictionary containing options for the context. For applicable keys and values, see Context Options.

Return Value

An initialized Core Image context.

Discussion

If you create a context without specifying a rendering destination, Core Image automatically chooses and internally manages a rendering destination based on the current device’s capabilities and your settings in the options dictionary. You cannot use a context without an explicit destination for the methods listed in Drawing Images. Instead, use the methods listed in Rendering Images.

The options dictionary defines behaviors for the context, such as color space and rendering quality. For example, to create a CPU-based context, use the kCIContextUseSoftwareRenderer key.

See Also

Creating a Context Without Specifying a Destination

+ context

Creates a context without a specific rendering destination, using default options.

- init

Initializes a context without a specific rendering destination, using default options.

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