[Catalyst] How do you make your favicon file?

Richard Siddall richard.siddall at elirion.net
Wed Mar 23 11:51:12 GMT 2011


John M. Dlugosz wrote:
> So, what tool do you use to create this file, say, by converting a PNG?

I've used something like this for converting a GIF using NetPBM tools:

#!/bin/sh
# Make a favicon.ico file from an input file
# Currently only works for square input files: you have to crop to a #square
giftopnm input.gif > tmp.ppm
pnmscale -width 48 tmp.ppm > tmp48.ppm
pnmscale -width 32 tmp.ppm > tmp32.ppm
pnmscale -width 16 tmp.ppm > tmp16.ppm
ppmquant 256 tmp48.ppm > tmp.ppm
mv tmp.ppm tmp48.ppm
ppmquant 16 tmp32.ppm > tmp.ppm
mv tmp.ppm tmp32.ppm
ppmquant 16 tmp16.ppm > tmp.ppm
mv tmp.ppm tmp16.ppm
ppmtowinicon -output favicon.ico tmp48.ppm tmp32.ppm tmp16.ppm
/bin/rm tmp48.ppm tmp32.ppm tmp16.ppm

Regards,

	Richard.



More information about the Catalyst mailing list