summaryrefslogblamecommitdiff
path: root/do_gen_favicon
blob: a7bbc667efbd940bdfb3cd4a5e80277a0ee4df8d (plain) (tree)


















                                             
#!/bin/sh

SIZES="16 32 64 128 256"

[[ -z $1 ]] && exit 1;
temp_dir=$(mktemp -d /tmp/favicon.XXXXXXXXXX)

for size in $SIZES
do
    convert "$1" \
        -depth 8 \
        -background transparent \
        -flatten \
        -resize \
        "${size}x${size}" \
        "$temp_dir/$size.png"
done

convert "$temp_dir/*" favicon.ico