Function

CGImageCreateWithPNGDataProvider

Creates a bitmap image using PNG-encoded data supplied by a data provider.

Declaration

CGImageRef CGImageCreateWithPNGDataProvider(CGDataProviderRef source, const CGFloat *decode, bool shouldInterpolate, CGColorRenderingIntent intent);

Parameters

source

A data provider supplying PNG-encoded data.

decode

The decode array for the image. Typically a decode array is unnecessary, and you should pass NULL.

shouldInterpolate

A Boolean value that specifies whether interpolation should occur. The interpolation setting specifies whether a pixel-smoothing algorithm should be applied to the image.

intent

A CGColorRenderingIntent constant that specifies how to handle colors that are not located within the gamut of the destination color space of a graphics context.

Return Value

A new CGImage. You are responsible for releasing this object by calling CGImageRelease.

See Also

Creating Bitmap Images

CGImageCreate

Creates a bitmap image from data supplied by a data provider.

CGImageCreateCopy

Creates a copy of a bitmap image.

CGImageCreateCopyWithColorSpace

Creates a copy of a bitmap image, replacing its colorspace.

CGImageCreateWithJPEGDataProvider

Creates a bitmap image using JPEG-encoded data supplied by a data provider.

CGImageCreateWithImageInRect

Creates a bitmap image using the data contained within a subregion of an existing bitmap image.

CGImageCreateWithMask

Creates a bitmap image from an existing image and an image mask.

CGImageCreateWithMaskingColors

Creates a bitmap image by masking an existing bitmap image with the provided color values.