CGImageSource

Overview

CGImageSource objects abstract the data-reading task. An image source can read image data from a URL, a CFData object, or a data consumer.

After creating a CGImageSource object for the appropriate source, you can obtain images, thumbnails, image properties, and other image information using CGImageSource functions.

Topics

Creating an Image Source

CGImageSourceCreateWithDataProvider

Creates an image source that reads data from the specified data provider.

CGImageSourceCreateWithData

Creates an image source that reads from a Core Foundation data object.

CGImageSourceCreateWithURL

Creates an image source that reads from a location specified by a URL.

Creating Images From an Image Source

CGImageSourceCreateImageAtIndex

Creates a CGImage object for the image data associated with the specified index in an image source.

CGImageSourceCreateThumbnailAtIndex

Creates a thumbnail image of the image located at a specified location in an image source.

CGImageSourceCreateIncremental

Create an incremental image source.

Updating an Image Source

CGImageSourceUpdateData

Updates an incremental image source with new data.

CGImageSourceUpdateDataProvider

Updates an incremental image source with a new data provider.

Getting Information From an Image Source

CGImageSourceGetTypeID

Returns the unique type identifier of an image source opaque type.

CGImageSourceGetType

Returns the uniform type identifier of the source container.

CGImageSourceCopyTypeIdentifiers

Returns an array of uniform type identifiers (UTIs) that are supported for image sources.

CGImageSourceGetCount

Returns the number of images (not including thumbnails) in the image source.

CGImageSourceCopyProperties

Returns the properties of the image source.

CGImageSourceCopyPropertiesAtIndex

Returns the properties of the image at a specified location in an image source.

CGImageSourceGetStatus

Return the status of an image source.

CGImageSourceGetStatusAtIndex

Returns the current status of an image that is at a specified location in an image source.

Data Types

CGImageSourceRef

An opaque type that represents an image source.

Constants

CGImageSourceStatus

Status states for images and image sources.

Image Source Option Dictionary Keys

Keys that you can include in the options dictionary to create an image source.

See Also