Theocacao
Leopard
Design Element
Comment on "Convert an NSImage to CIImage"
by Paul F. — Nov 14
Here's my solution:

NSSize size = [image size];
[image lockFocus];

NSRect imageRect = NSMakeRect(0, 0, size.width, size.height);

NSBitmapImageRep* rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect: imageRect];
[rep autorelease];
CIImage *bitmap = [[CIImage alloc] initWithBitmapImageRep: rep];
[bitmap autorelease];
[image unlockFocus];
Back to "Convert an NSImage to CIImage"
Design Element

Copyright © Scott Stevenson 2004-2015