Contents

CGImageDestination

An opaque type that you use to write image data to a URL, data object, or data consumer.

Declaration

class CGImageDestination

Overview

A CGImageDestination object provides an abstract interface for saving image data. Use an image destination to represent a single image, or multiple images packaged together. For example, you might create an image that also contains a thumbnail. You can also use the image destination to add metadata to your images.

An image destination outputs data to a URL, a CFData object, or a CGDataConsumer object, which you specify at creation time. After you create the image destination, add the image data and properties. When you are done, call CGImageDestinationFinalize(_:) to finalize the image data and write it to the output location.

For more information, see Image I/O Programming Guide.

Topics

Creating an Image Destination

Adding Images to the Destination

Adding Metadata to the Image

Finalizing the Image Data

Getting the Image Types

Configuring the Image Behaviors

See Also

Image Management