Instance Method


Creates a Quartz 2D image from a region of a Core Image image object with deferred rendering.


func createCGImage(_ image: CIImage, from fromRect: CGRect, format: CIFormat, colorSpace: CGColorSpace?, deferred: Bool) -> CGImage?



A Core Image image object.


The region of the image to render.


The pixel format of the image.


The color space for the output image. This color space must conform to either the CGColorSpaceModel.rgb or CGColorSpaceModel.monochrome model and be compatible with the specified pixel format.


If true, Core Image delays rendering until the output Quartz 2D image is itself to be rendered. If false, Core Image renders to the output Quartz 2D image immediately.

Return Value

A Quartz 2D image. You are responsible for releasing the returned image when you no longer need it.


Renders a region of an image into a temporary buffer using the context, and then creates and returns a Quartz 2D image with the results.

See Also

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