How to create an .ico ??

Romain Kang romain at kzsu.stanford.edu
Tue Feb 18 11:37:06 PST 2003


On Wed, Feb 19, 2003 at 03:44:19AM +1200, Peter Nacken wrote:
> I just wasted some good time trying some shareware apps from
> versiontracker.com to create a .ico file  (out of a .psd or jpg or whatever
> you want) .. 

The netpbm tools have a program called "ppmtowinicon" which can convert
netpbm's internal format (PNM) to .ico files.  You need to first convert
the jpeg to PNM, so you'd use something like this:

	djpeg 16x16.jpg | pnmdepth 15 > 16x16.pnm
	djpeg 32x32.jpg | pnmdepth 15 > 32x32.pnm
	djpeg 48x48.jpg | pnmdepth 255 > 48x48.pnm
	ppmtowinicon -output my.ico 16x16.pnm 32x32.pnm 48x48.pnm

This assumes you want a multi-resolution .ico, though for the browser
window, you just need the 16x16 image.

There's a link for prebuilt OS X netpbm under:
	http://www.macosxhints.com/article.php?story=20021031065018309

Romain Kang                             Disclaimer: I speak for myself alone,
romain at kzsu.stanford.edu                except when indicated otherwise.



More information about the iBook mailing list