Add CGImage to CGImageDestination at specific index

爱⌒轻易说出口 提交于 2019-12-11 18:11:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!