• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSImage -- getting raw bitmap data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSImage -- getting raw bitmap data
      • From: Marcel Weiher <email@hidden>
    • Re: NSImage -- getting raw bitmap data
      • From: "Dennis C.De Mars" <email@hidden>
  • Prev by Date: Re: Corrupted NSMutableString
  • Next by Date: Re: Optimizing for code size
  • Previous by thread: Getting rid of "multiple declarations"
  • Next by thread: Re: NSImage -- getting raw bitmap data
  • Index(es):
    • Date
    • Thread