Convert PNG to ICO with transparency
The first thing deserving special atention in visual design of any new website is probably the (in)famous favicon.ico.
That’s because of
- many browsers, directories and other appliances do show it and the sites without the icon appear rather bleak, and
- once it’s fetched by a client it is almost literally “carved in stone” – the cache for favicons is usually kept separately and with very dissimilar purging policies to regular pages cache. That means your old visitors will probably never see any of your newer versions of favicon.ico.
So you better take your time and make a nice drawing of 16×16 pixels representing your site. After you’ve done with the actual drawing you’ll only face one problem: getting it into the right file format.
Despite the fact that the very format of .ico was proposed by Microsoft there is no way to create .ico files in Microsoft Windows with standard toolset, even having PhotoShop with its web oriented ImageReady doesn’t do (up to version CS2 at least).
That’s where a simple tool to create your own favicon.ico from an indexed PNG file (i.e. PNG-8) comes to help.
pngtoico is a nice small utility to convert a set of PNG images to Microsoft ICO format. Transparency is supported.
Consists of only 1 .c file and a Makefile.
It also has got a man page(!)
As a matter of fact I wouldn’t care about another tool I had already counterpart for – converticon.com. However the site seized providing service recently as I needed an icon for 123UNIX.com, besides it lacked transparency support wich I missed in a number of situations.