Initializer

init(cgContext:options:)

Creates a Core Image context from a Quartz context, using the specified options.

Declaration

init(cgContext cgctx: CGContext, options: [CIContextOption : Any]? = nil)

Parameters

ctx

A Quartz graphics context (CGContext object) either obtained from the system or created using a Quartz function such as init(data:width:height:bitsPerComponent:bytesPerRow:space:bitmapInfo:). See Quartz 2D Programming Guide for information on creating Quartz graphics contexts.

dict

A dictionary that contains color space information. You can pass any of the keys defined in Context Options along with the appropriate value.

Discussion

After calling this method, Core Image draws content to the specified Quartz graphics context.

When you create a CIContext object using a Quartz graphics context, any transformations that are already set on the Quartz graphics context affect drawing to that context.

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