-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-icon-resize.sh
79 lines (56 loc) · 2.1 KB
/
app-icon-resize.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# Ubuntu Inkscape location
INK=/usr/bin/inkscape
# MAC Inkscape location
# INK=/Applications/Inkscape.app/Contents/Resources/bin/inkscape
if [[ -z "$1" ]]
then
echo "SVG file needed."
exit;
fi
BASE=`basename "$1" .svg`
SVG="$1"
# Android xxxhdpi 192px
$INK -z -D -e "$BASE-xxxhdpi.png" -f $SVG -w 192 -h 192
# Android xxhdpi 144px
$INK -z -D -e "$BASE-xxhdpi.png" -f $SVG -w 144 -h 144
# Android xhdpi 96px
$INK -z -D -e "$BASE-xhdpi.png" -f $SVG -w 96 -h 96
# Android hdpi 72px
$INK -z -D -e "$BASE-hdpi.png" -f $SVG -w 72 -h 72
# Android mdpi 48px
$INK -z -D -e "$BASE-mdpi.png" -f $SVG -w 48 -h 48
# Android ldpi 36px
$INK -z -D -e "$BASE-ldpi.png" -f $SVG -w 36 -h 36
# Android market image 512px
$INK -z -D -e "$BASE-android-market.png" -f $SVG -w 512 -h 512
# iPhone Spotlight iOS5,6 Settings iOS and iPad 5-7 29pt
$INK -z -D -e "$BASE-29.png" -f $SVG -w 29 -h 29
$INK -z -D -e "[email protected]" -f $SVG -w 58 -h 58
$INK -z -D -e "[email protected]" -f $SVG -w 87 -h 87
# iPhone Spotlight iOS7 40pt
$INK -z -D -e "[email protected]" -f $SVG -w 80 -h 80
# iPhone App iOS 5,6 57pt
$INK -z -D -e "$BASE-57.png" -f $SVG -w 57 -h 57
$INK -z -D -e "[email protected]" -f $SVG -w 114 -h 114
# iPhone App iOS 7 60pt
$INK -z -D -e "$BASE-60.png" -f $SVG -w 60 -h 60
$INK -z -D -e "[email protected]" -f $SVG -w 120 -h 120
$INK -z -D -e "[email protected]" -f $SVG -w 180 -h 180
# iPad Spotlight iOS 7 40pt
$INK -z -D -e "$BASE-40.png" -f $SVG -w 40 -h 40
# iPad Spotlight iOS 5,6 50pt
$INK -z -D -e "$BASE-50.png" -f $SVG -w 50 -h 50
$INK -z -D -e "[email protected]" -f $SVG -w 100 -h 100
# iPad App iOS 5,6 72pt
$INK -z -D -e "$BASE-72.png" -f $SVG -w 72 -h 72
$INK -z -D -e "[email protected]" -f $SVG -w 144 -h 144
$INK -z -D -e "[email protected]" -f $SVG -w 167 -h 167
# iPad App iOS 7 76pt
$INK -z -D -e "$BASE-76.png" -f $SVG -w 76 -h 76
$INK -z -D -e "[email protected]" -f $SVG -w 152 -h 152
#iTunes Artwork
$INK -z -D -e "$BASE-512.png" -f $SVG -w 512 -h 512
$INK -z -D -e "$BASE-1024.png" -f $SVG -w 1024 -h 1024
cp "$BASE-512.png" iTunesArtwork.png
cp "$BASE-1024.png" [email protected]