Skip to content

Instantly share code, notes, and snippets.

@sammyd
Created April 24, 2015 15:01
Show Gist options
  • Save sammyd/92c5115c5585fb95c2ff to your computer and use it in GitHub Desktop.
Save sammyd/92c5115c5585fb95c2ff to your computer and use it in GitHub Desktop.
Using CIImage in a playground
import Foundation
import CoreImage
let url = NSBundle.mainBundle().URLForResource("400x400", withExtension: "jpeg")
let image = CIImage(contentsOfURL: url)
let filter = CIFilter(name: "CISepiaTone",
withInputParameters: [kCIInputImageKey : image,
kCIInputIntensityKey : 0.8])
filter.outputImage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment