When saving a 48MP image, CGImageDestinationFinalize consumes a large amount of memory. Are there any optimization methods available?

it will use about 300MB memory, it cause a memory peak

Hi there, Could we get a little more information. Are these 48 MP images from the iPhone camera? What format are you storing them in? If you ask the AVCapturePhotoOutput for a 48 MP as a HEIC or JPEG, you can write directly to a file without using CGImageDestination.

When saving a 48MP image, CGImageDestinationFinalize consumes a large amount of memory. Are there any optimization methods available?
 
 
Q