Instance Method


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


func createCGImage(_ image: CIImage, from fromRect: CGRect) -> CGImage?



A Core Image image object.


The region of the image to render.

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, then creates and returns a Quartz 2D image with the results.

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