Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / January 2006



Tip: Looking for answers? Try searching our database.

Convert CGImageRef to IconRef

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter - 12 Jan 2006 14:09 GMT
Hi,

Does anyone know how to convert a CGImageRef to an IconRef?

Using files/resource data is not an option as the bitmap data is
generated programatically.

The code must work on 10.2 and up.

Thanks in advance,

Peter
Uli Kusterer - 15 Jan 2006 17:35 GMT
> Does anyone know how to convert a CGImageRef to an IconRef?
>
> Using files/resource data is not an option as the bitmap data is
> generated programatically.
>
> The code must work on 10.2 and up.

IIRC you could convert the CGImageRef into an NSImage and then use the
IconFamily class (available somewhere on the web, just google) to
convert the graphics into icons.

You might even be able to use the Carbon calls in that code and write
your own to directly do the CGImage/icns conversion.

Cheers,
-- Uli
http://www.zathras.de
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.