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 (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 arch...@mail-archive.com

Reply via email to