Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created August 21, 2014 16:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahoward/fc102c4860e07cadbe02 to your computer and use it in GitHub Desktop.
Save ahoward/fc102c4860e07cadbe02 to your computer and use it in GitHub Desktop.
generating correct favicons is trivial with image magick
#! /bin/sh
# file : ~/bin/favicon
#
# usage: favicon foo.png
convert "$@" -resize 16x16 favicon-16.png
convert "$@" -resize 32x32 favicon-32.png
convert "$@" -resize 64x64 favicon-64.png
convert "$@" -resize 128x128 favicon-128.png
convert "$@" -resize 256x256 favicon-256.png
convert favicon-16.png favicon-32.png favicon-64.png favicon-128.png favicon-256.png -colors 256 favicon.ico
#convert favicon-16.png favicon.ico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment