<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImageIO",
  "identifier" : "/documentation/ImageIO/CGImageDestinationFinalize(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Image I/O"
    ],
    "preciseIdentifier" : "c:@F@CGImageDestinationFinalize"
  },
  "title" : "CGImageDestinationFinalize(_:)"
}
-->

# CGImageDestinationFinalize(_:)

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

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

## Parameters

`idst`

An image destination.

## Return Value

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

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)