我该如何将两个或多个CIImage合并成另一个图像?我尝试使用ciContext.drawImage方法。如何从中获取CGImage?我的理解是,我正在从上下文中写入图像,应该能够获得一张图片。如果我有任何误解,请告诉我。
let eaglContext = EAGLContext(API: .OpenGLES2)
let ciContext = CIContext(EAGLContext: eaglContext)
ciContext.drawImage(firstCIImage, inRect: firstRect, fromRect: secondRect)
ciContext.drawImage(secondCIImage, inRect: secondRect, fromRect: secondRect)