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.

Symbols

Creating an Image Source

func CGImageSourceCreateWithDataProvider(CGDataProvider, CFDictionary?)

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

func CGImageSourceCreateWithData(CFData, CFDictionary?)

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

func CGImageSourceCreateWithURL(CFURL, CFDictionary?)

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

Creating Images From an Image Source

func CGImageSourceCreateImageAtIndex(CGImageSource, Int, CFDictionary?)

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

func CGImageSourceCreateThumbnailAtIndex(CGImageSource, Int, CFDictionary?)

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

func CGImageSourceCreateIncremental(CFDictionary?)

Create an incremental image source.

Updating an Image Source

func CGImageSourceUpdateData(CGImageSource, CFData, Bool)

Updates an incremental image source with new data.

func CGImageSourceUpdateDataProvider(CGImageSource, CGDataProvider, Bool)

Updates an incremental image source with a new data provider.

Getting Information From an Image Source

func CGImageSourceGetTypeID()

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

func CGImageSourceGetType(CGImageSource)

Returns the uniform type identifier of the source container.

func CGImageSourceCopyTypeIdentifiers()

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

func CGImageSourceGetCount(CGImageSource)

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

func CGImageSourceCopyProperties(CGImageSource, CFDictionary?)

Returns the properties of the image source.

func CGImageSourceCopyPropertiesAtIndex(CGImageSource, Int, CFDictionary?)

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

func CGImageSourceGetStatus(CGImageSource)

Return the status of an image source.

func CGImageSourceGetStatusAtIndex(CGImageSource, Int)

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

Data Types

CGImageSource

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.