Instance Method

createCGImage:fromRect:format:colorSpace:deferred:

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

Declaration

- (CGImageRef)createCGImage:(CIImage *)image fromRect:(CGRect)fromRect format:(CIFormat)format colorSpace:(CGColorSpaceRef)colorSpace deferred:(BOOL)deferred;

Parameters

image

A Core Image image object.

fromRect

The region of the image to render.

format

The pixel format of the image.

colorSpace

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

deferred

If YES, Core Image delays rendering until the output Quartz 2D image is itself to be rendered. If NO, 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.

Discussion

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

Rendering Images

- createCGImage:fromRect:

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

- createCGImage:fromRect:format:colorSpace:

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

- createCGLayerWithSize:info:

Creates a CGLayer object from the provided parameters.

Deprecated
- render:toCVPixelBuffer:

Renders an image into a pixel buffer.

- render:toCVPixelBuffer:bounds:colorSpace:

Renders a region of an image into a pixel buffer.

- render:toIOSurface:bounds:colorSpace:

Renders a region of an image into an IOSurface object.

- render:toMTLTexture:commandBuffer:bounds:colorSpace:

Renders a region of an image to a Metal texture.