---
title: "CGImageDestinationFinalize(_:)"
framework: imageio
role: symbol
role_heading: Function
path: "imageio/cgimagedestinationfinalize(_:)"
---

# CGImageDestinationFinalize(_:)

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

## Declaration

```swift
func CGImageDestinationFinalize(_ idst: CGImageDestination) -> Bool
```

## Parameters

- `idst`: An image destination.

## Return Value

Return Value true if the image destination successfully finalized the images, or false if an error occurred.

## Discussion

Discussion Call this method as the final step in saving your images. The output of the image destination isn’t valid until you call this method. After calling this function, you can’t add any more data to the image destination.
