On May 23, 2008, at 3:32 PM, Stephen Herron wrote:
The goal:
A window with two views. The view on the left, NSImageView, displays
the NSImage from - (void)openPanelDidEnd:. The right view, NSView,
displays the result of a CIFilter using the pixel data displayed in
the right-hand view.
The problem:
I cannot convert the NSImage used in the NSImageView to a CIImage
because:
1. I do not know how to access the NSImage pixel data
You can make an NSBitmapImageRep and draw the NSImage into that.
2. I do not know how to convert NSImage data to CIImage data. (The
developer site has code samples for CGImage to CIImage but nothing
for NSImage to CIImage?)
There's a handful of ways and depends what works best for you. One is
to get an NSData with TIFFRepresentation and use that data to
initWithData: a CIImage. Or make it with the bitmap created from the
above.
There's also ways to do these using CoreGraphics if you need those
types as well. If so I can give examples using those.
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]