---
title: "CGImageDestinationAddImage(_:_:_:)"
framework: imageio
role: symbol
role_heading: Function
path: "imageio/cgimagedestinationaddimage(_:_:_:)"
---

# CGImageDestinationAddImage(_:_:_:)

Adds an image to an image destination.

## Declaration

```swift
func CGImageDestinationAddImage(_ idst: CGImageDestination, _ image: CGImage, _ properties: CFDictionary?)
```

## Parameters

- `idst`: The image destination to modify.
- `image`: The image to add.
- `properties`: An optional dictionary that specifies the properties of the added image. Specify NULL to omit any additional properties. For a list of possible values, see doc://com.apple.imageio/documentation/ImageIO/image-properties and doc:CGImageDestination/Configuring-the-Image-Behaviors.

## Discussion

Discussion The function logs an error if you add more images than what you specified when you created the image destination.

## See Also

### Adding Images to the Destination

- [CGImageDestinationAddImageFromSource(_:_:_:_:)](imageio/cgimagedestinationaddimagefromsource(_:_:_:_:).md)
