How do I combine two or more CIImage into another one. I tried using ciContext.drawImage. How do I get a CGImage from it ?? What I have understood is that I am writing into a context from which I should be able to get an Image. Please let me know if I have understood anything wrong.
let eaglContext = EAGLContext(API: .OpenGLES2)
let ciContext = CIContext(EAGLContext: eaglContext)
ciContext.drawImage(firstCIImage, inRect: firstRect, fromRect: secondRect)
ciContext.drawImage(secondCIImage, inRect: secondRect, fromRect: secondRect)