CGImageDestination

Overview

CGImageDestination objects abstract the data-writing task. An image destination can represent a single image or multiple images. It can contain thumbnail images as well as properties for each image.

The functions described in this reference can write data to three kinds of destinations: a URL, a CFData object, and a data consumer. After creating a CGImageDestination object for the appropriate destination, you can add image data and set image properties. When you are finished adding data, call the function CGImageDestinationFinalize to write the image data and properties to the URL, CFData object, or data consumer.

Topics

Creating Image Destinations

CGImageDestinationCreateWithDataConsumer

Creates an image destination that writes to the specified data consumer.

CGImageDestinationCreateWithData

Creates an image destination that writes to a Core Foundation mutable data object.

CGImageDestinationCreateWithURL

Creates an image destination that writes to a location specified by a URL.

Adding Images

CGImageDestinationAddImage

Adds an image to an image destination.

CGImageDestinationAddImageFromSource

Adds an image from an image source to an image destination.

Getting Type Identifiers

CGImageDestinationCopyTypeIdentifiers

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

CGImageDestinationGetTypeID

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

Setting Properties

CGImageDestinationSetProperties

Applies one or more properties to all images in an image destination.

Finalizing an Image Destination

CGImageDestinationFinalize

Writes image data and properties to the data, URL, or data consumer associated with the image destination.

Data Types

CGImageDestinationRef

An opaque type that represents an image destination.

Constants

Destination Properties

Properties for a single image in an image destination.

See Also