favicon, or favorite icon appears on every website nowadays, to create a nice and transparent background favicon is not a difficult task.
First of all I though I can do it everything on a line of command, I was thinking to just use convert from image magick package to do a magic. But unfortunately that is not the case, convert can read ico format but can’t write ico format.
So, we need some command to convert image to ico. Gimp is a good alternative. But it seems gimp is too heavy, I need something light. I discovered a good tiny program just to convert png to ico – png2ico.
Anyway, I couldn’t find it in my repository, but I find png2ico’s source code. Did that scared you away? It is pretty easy to compile and install. It doesn’t seems to need any extra libraries besides libpng.
Download the archive and compile by just typing
That’s right, no configure and no make install either. Copy over your binaries to /usr/bin.
Now lets get started!
First create your favicon image, or find any good looking image with transparent background. Make sure they are in square size such as 128×128, 300×300 will do fine. Resize with convert.
convert gajim.png -resize 32x32 favicon.png
I resize it to 32×32 pixels, for favicon 16×16 should be enough. And the last step, convert it to icon format.
png2ico favicon.ico favicon.png
Done. How to load up for your blog or website? Check it out here.
[tags] favicon, web design, graphics design, howto [/tags]