I would like to create .ico
icon for my Windows application dynamically (from the SVG file) by using ImageMagick. How do I do that?
Microsoft lists vari
I cleaned up Malcolm's solution, fixed a bug, and also made the script output tiffs so you can run tiff2icns in osx.
#! /bin/bash
# converts the passed-in svgs to tiff and ico
if [[ $# -eq 0 ]]; then
echo "Usage: $0 svg1 [svg2 [...]]"
exit 0
fi
temp=$(mktemp -d)
declare -a res=(16 24 32 48 64 128 256 512)
for f in $*; do
mkdir -p $temp/$(dirname $f)
for r in "${res[@]}"; do
inkscape -z -e $temp/${f}${r}.png -w $r -h $r $f
done
resm=( "${res[@]/#/$temp/$f}" )
resm=( "${resm[@]/%/.png}" )
for filetype in ico tiff; do
convert "${resm[@]}" ${f%%.*}.$filetype
done
done
rm -rf $temp