Skip to content

Instantly share code, notes, and snippets.

@ecentinela
Created January 19, 2015 19:32
Show Gist options
  • Save ecentinela/a07d683b41b9e0c1404d to your computer and use it in GitHub Desktop.
Save ecentinela/a07d683b41b9e0c1404d to your computer and use it in GitHub Desktop.
CIFilter
let imageRef1 = self.backgroundView?.image?.CGImage
let coreImage1 = CIImage(CGImage: imageRef1)
let imageRef2 = image?.CGImage
let coreImage2 = CIImage(CGImage: imageRef2)
let coreImage3 = coreImage1.imageByApplyingFilter("CIColorBlendMode", withInputParameters: ["inputBackgroundImage" : coreImage2])
self.imageView?.image = UIImage(CIImage: coreImage3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment