• 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
Re: Convert GWorldPtr into a NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Convert GWorldPtr into a NSImage (From: Eric Gorr <email@hidden>)
 >Re: Convert GWorldPtr into a NSImage (From: Graham Cox <email@hidden>)
 >Re: Convert GWorldPtr into a NSImage (From: Eric Gorr <email@hidden>)
 >Re: Convert GWorldPtr into a NSImage (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Works in main Thread, but not in background Thread (modified)
  • Next by Date: Re: Odd EXEC_BAD_ACCESS after executing URLRequest [SOLVED]
  • Previous by thread: Re: Convert GWorldPtr into a NSImage
  • Next by thread: Re: Convert GWorldPtr into a NSImage
  • Index(es):
    • Date
    • Thread