Re: Convert GWorldPtr into a NSImage
Re: Convert GWorldPtr into a NSImage
- Subject: Re: Convert GWorldPtr into a NSImage
- From: Eric Gorr <email@hidden>
- Date: Wed, 7 Jan 2009 10:38:58 -0500
On Jan 7, 2009, at 10:24 AM, Graham Cox wrote:
However if you need to flip each pixel's byte order you might not
have much choice but to iterate over the buffer and do it by hand.
It's still going to be much simpler than creating a data provider,
etc. You've already got the data, all that other stuff looks like
overkill.
Perhaps it is possible to draw a GWorldPtr into a CGBitmapContext and
then take that context and convert it into a NSImage. Perhaps this
drawing into a CGBitmapContext is reliable, handling the BGRA
pixelFormat.
_______________________________________________
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