CGImageDestinationFinalize
CGImageDestination is a Core Graphics framework object in Apple's Cocoa and Cocoa Touch environments that allows developers to create image files in various formats. It acts as an intermediary between raw image data and a file on disk or in memory. The primary function of CGImageDestination is to assemble pixel data into a coherent image file, supporting a range of common image types such as JPEG, PNG, and TIFF.
To use CGImageDestination, a developer typically starts by creating a CGImageDestination object, specifying the destination URL