I like to convert an NSImage to a CIImage in swift 2.2 for a mac app. Does anybody have some example code?
Here's one way:
let image = NSImage(contentsOfFile: "...")!
let imageData = image.tiffRepresentation!
let ciImage = CIImage(data: imageData)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With