Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
- Subject: Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?
- From: Quincey Morris <email@hidden>
- Date: Mon, 21 Feb 2011 13:29:49 -0800
On Feb 21, 2011, at 13:19, Jonny Taylor wrote:
> So do I understand it correctly that there is no way at all of peeking (read only) at the pixels of a NSBitmapImageRep without triggering a copy? That's a bit of a shame if so - guess I'll have to look into CoreImage.
If I understand the release notes properly, there are 3 choices:
1. Draw from the NSBitmapImageRep into some kind of drawing context. This may not be as expensive as it sounds. You could draw into a 1-pixel rect if you wanted.
2. Get the underlying NSBitmapImageRep data, thus causing a copy. If you're going to be accessing multiple pixel values, this is also not be as expensive as it sounds, so long as you don't do anything that forces the frameworks to copy the data for every pixel.
3. Use something else, such as CGImage, instead.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden