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