Hey David,
Why not just use the
CGDataProviderCopyData(CGImageGetDataProvider(imageRef)) to create a
new NSBitmapImageRequest with the image's original data? Is drawing it
more performant or gives you a better more compact data
representation?

_Karl

On Thu, Aug 18, 2011 at 4:23 PM, David Duncan <david.dun...@apple.com> wrote:
> On Aug 18, 2011, at 4:16 PM, James Walker wrote:
>
>> Let's say I have an NSImage that contains some representation other than an 
>> NSBitmapImageRep, and I want to play with the pixel values.
>
>
> Create your NSBitmapImageRep
> Create a NSGraphicsContext from that rep and make it current
> Draw your NSImageRep using -draw (or -drawAtPoint: or -drawInRect:) to draw 
> into the current graphics context.
>
> You now have an NSBitmapImageRep with your image contents.
> --
> David Duncan
>
> _______________________________________________
>
> 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/karl.adam%40gmail.com
>
> This email sent to karl.a...@gmail.com
>
_______________________________________________

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