audreyfeldroy / favicon-cheat-sheet

Obsessive cheat sheet to favicon sizes/types. Please contribute! (Note: this may be in flux as I learn new things about favicon best practices.)
MIT License
9.85k stars 413 forks source link

Using ImageMagick #6

Open rstacruz opened 10 years ago

rstacruz commented 10 years ago

Hey! Nice work!

It might be worth noting that it's very easy to convert a PNG to ICO (with retina support!) using ImageMagick.

$ ls
favicon-32.png

$ convert favicon-32.png -resize 16x16 favicon-16.png

$ convert favicon-32.png favicon-16.png favicon.ico

$ ls
favicon-32.png
favicon-16.png
favicon.ico
bebraw commented 10 years ago

As a sidenote I just wrote a tool that wraps ImageMagick and allows you to convert pngs in batch. See png2ico.

It outputs 16x16 px output by default and supports transparency. It would be somewhat easy to allow it to support other sizes mentioned in the README as well.

audreyfeldroy commented 10 years ago

@rstacruz Thanks! I added a stronger recommendation for using ImageMagick, together with OptiPNG (I love both). I didn't specify exact commands for either, but do you think the actual commands should be in the cheat sheet?

@bebraw Nice, added! I haven't tried it out yet but will soon. Yay for having an open source convenience wrapper.

kitchin commented 9 years ago

And ImageMagick comes with a handy tool called "identify" which analyzes any image. As you can see, it works in Windows too:

c:\blah>identify fav1.ico
fav1.ico[0] ICO 16x16 16x16+0+0 8-bit sRGB 15.3KB 0.000u 0:00.003
fav1.ico[1] ICO 32x32 32x32+0+0 32-bit sRGB 15.3KB 0.000u 0:00.012
fav1.ico[2] ICO 48x48 48x48+0+0 32-bit sRGB 15.3KB 0.000u 0:00.024