Created
May 17, 2016 17:30
-
-
Save FlexMonkey/a3fca959b5e566b4ccc785b00b75d396 to your computer and use it in GitHub Desktop.
CIImage from named NSImage for Cocoa
This file contains 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
let monalisa = NSImage(named: "monalisa.jpg")! | |
let tiffData = monalisa.TIFFRepresentation! | |
let bitmap = NSBitmapImageRep(data: tiffData) | |
let image = CIImage(bitmapImageRep: bitmap!)! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment