Welcome to mirror list, hosted at ThFree Co, Russian Federation.

create-ico.sh « windows « share - github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 44ae06a04577dfb2db93f439de15f6820262b5ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

if [[ -z "$1" ]]; then
  echo "You must include an SVG file to convert!"
  exit 1
fi

outfile=$2
if [[ -z "outfile" ]]; then
  outfile="logo.ico"
fi

echo "Generating $outfile from $1..."
size_list=(16 24 32 48 64 128 256)
for size in ${size_list[@]}; do
    inkscape -z -e $size.png -w $size -h $size "$1" >/dev/null 2>/dev/null
done

images=`printf "%s.png " "${size_list[@]}"`
convert $images $outfile

rm $images