Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Mac OS X Development Forums > Mac OS X Development

Reply
 
LinkBack Thread Tools Display Modes
Old 12-29-2009, 11:42 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 3
Default NSImage from byte buffer of PNG

I have a large binary container that has a png image inside of it I need to display on the screen.
I have extracted the image no problem, and have it in an NSData object, but now I need to display the image on screen.
I tried NSImage initwithdata but it fails.
The farthest I have gotten so far is making a NSBitmapImageRep of the data and then encapsulating that in a CGImage. I can't seem to figure out a way to convert the CGImage to an NSImage though. This is 10.5 so the initwithCGImage wont work.
Drawing the CGImage on the screen will also suffice.

Anyone know how to do this?

thanks in advance
/total mac cocoa noob
yaazz is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting 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
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 323
20 members and 303 guests
ADY, Alsahir, Dani77, e2applets, iph_s, JasonR, keeshux, mer10, Monstertaco, piesia, prchn4christ, Promo Dispenser, Robiwan, Rudy, sebasx, sly24, Touchmint, twerner
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,759
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:25 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0