-
Notifications
You must be signed in to change notification settings - Fork 0
/
icon.sh
executable file
·31 lines (27 loc) · 1.41 KB
/
icon.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Create Resources/AppIcon29x29.png, 40x40, 50x50, 57x57, 60x60, 72x72, 76x76 and the 2x and 3x variants of each
# from a single 1024x1024 PNG file using ffmpeg.
# Check for input file
if [ ! -f "$1" ]; then
echo "Usage: icon.sh input.png"
exit 1
fi
# Create the icons
ffmpeg -y -i "$1" -vf scale=29:29 Resources/AppIcon29x29.png
ffmpeg -y -i "$1" -vf scale=58:58 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=87:87 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=40:40 Resources/AppIcon40x40.png
ffmpeg -y -i "$1" -vf scale=80:80 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=120:120 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=50:50 Resources/AppIcon50x50.png
ffmpeg -y -i "$1" -vf scale=100:100 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=57:57 Resources/AppIcon57x57.png
ffmpeg -y -i "$1" -vf scale=114:114 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=171:171 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=60:60 Resources/AppIcon60x60.png
ffmpeg -y -i "$1" -vf scale=120:120 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=180:180 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=72:72 Resources/AppIcon72x72.png
ffmpeg -y -i "$1" -vf scale=144:144 Resources/[email protected]
ffmpeg -y -i "$1" -vf scale=76:76 Resources/AppIcon76x76.png
ffmpeg -y -i "$1" -vf scale=152:152 Resources/[email protected]