Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSImage and raw data.

NSImage and raw data.
Thread Tools
parallax
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Nov 2, 2001, 08:06 PM
 
I have a bunch of 32-bit raw data I wrote to (for example, malloc(sizeof(unsigned int) * (640*480))), and now I want to convert it into an NSImage. How would I do this?
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Rickster
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Nov 2, 2001, 08:15 PM
 
See the docs for NSBitmapImageRep and the longest method signature in the AppKit (which starts with initWithDataPlanes:...).
Rick Roe
icons.cx | weblog
     
parallax  (op)
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Nov 2, 2001, 09:05 PM
 
Thank you! That worked.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:47 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,