问题
Is there an option to add CGImage to specific index inside CGImageDestination?
We tried using CGImageDestinationAddImage but it adds images at a incremental order. We are creating some expensive CGImages where we need to add them in multiple indexes inside the destination. We thought about adding them to all needed "indexes" at once, saving the recreation.
generator.generateCGImagesAsynchronously(forTimes: <BigArrayOfTimes>, completionHandler: { (requestedTime, expensiveCgImage, actualTime, result, error) in
CGImageDestinationAddImage(destination, expensiveCgImage, frameProperties as CFDictionary)
// How can I add the CGImage in more known indexes, before releasing the CGImage?
})
来源:https://stackoverflow.com/questions/49268996/add-cgimage-to-cgimagedestination-at-specific-index