NSImage -- getting raw bitmap data
NSImage -- getting raw bitmap data
- Subject: NSImage -- getting raw bitmap data
- From: Uli Kusterer <email@hidden>
- Date: Sat, 2 Aug 2003 16:49:41 +0200
Hi,
I'm using NSBitmapImageRep's initWithBitmapDataPlanes: to get some raw
bitmap data into an NSImageView. Now, I've set this view to be
editable, and users can drag image files onto it to replace the data.
But how do I get the raw image data from whatever image the user
dragged onto my NSImageView? Basically, I'd need the reverse operation
of initWithBitmapDataPlanes:, but I need to force the image to be a
particular depth, number of planes etc.
Apple's "Drawing Images" docs are pretty terse on that topic, and
Mamasam only brought up a sample by Marco Binder that was close but no
cookie, even less on cocoadevcentral. I also tried to lockFocus on the
NSBitmapImageRep and just draw the image in there, but that didn't
change the data I passed in.
Help?
Thanks for any hints and clues,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.