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.

Symbols

Creating Image Destinations

func CGImageDestinationCreateWithDataConsumer(CGDataConsumer, CFString, Int, CFDictionary?)

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

func CGImageDestinationCreateWithData(CFMutableData, CFString, Int, CFDictionary?)

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

func CGImageDestinationCreateWithURL(CFURL, CFString, Int, CFDictionary?)

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

Getting Type Identifiers

func CGImageDestinationCopyTypeIdentifiers()

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

func CGImageDestinationGetTypeID()

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

Setting Properties

func CGImageDestinationSetProperties(CGImageDestination, CFDictionary?)

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

Finalizing an Image Destination

func CGImageDestinationFinalize(CGImageDestination)

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

Data Types

CGImageDestination

An opaque type that represents an image destination.

Constants

Destination Properties

Properties for a single image in an image destination.