Created
April 24, 2015 15:01
-
-
Save sammyd/92c5115c5585fb95c2ff to your computer and use it in GitHub Desktop.
Using CIImage in a playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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