| 1 |
#!/bin/bash |
| 2 |
sizes=(16 32 64 128 256 512) |
| 3 |
if [ ! -e icon.iconset ]; then |
| 4 |
mkdir icon.iconset |
| 5 |
fi |
| 6 |
for i in "${sizes[@]}"; do |
| 7 |
echo "making $i..." |
| 8 |
convert logo.png -filter Mitchell -scale "$i"x"$i" icon.iconset/icon_"$i"x"$i".png |
| 9 |
done |
| 10 |
for i in "${sizes[@]}"; do |
| 11 |
echo "making $i@2x..." |
| 12 |
convert logo.png -filter Mitchell -scale "$((i*2))"x"$((i*2))" icon.iconset/icon_"$i"x"$i""@2x.png" |
| 13 |
done |
| 14 |
|
| 15 |
convert \ |
| 16 |
-background none \ |
| 17 |
icon_16x16.svg \ |
| 18 |
icon.iconset/icon_256x256.png \ |
| 19 |
\( -clone 0 \) \ |
| 20 |
\( -clone 1 -resize 32x32 -extent 32x32 \) \ |
| 21 |
\( -clone 1 -resize 48x48 -extent 48x48 \) \ |
| 22 |
\( -clone 1 -resize 256x256 -extent 256x256 \) \ |
| 23 |
-delete 0 \ |
| 24 |
-delete 0 \ |
| 25 |
icon.ico |