Instance Method

createCGImage(_:from:)

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

Declaration

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

Parameters

im

A Core Image image object.

r

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.

Discussion

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