istereo2
view ios/icons/mkicons @ 7:a3c4fcc9f8f3
- started a goatkit UI theme
- font rendering with drawtext and shaders
- asset manager (only used by drawtext for now, will replace respath eventually)
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 24 Sep 2015 06:49:25 +0300 |
parents | |
children | 1b7776cb800b |
line source
1 #!/bin/sh
3 srcicon=icon.png
4 srclaunch=launch.png
6 while [ $# -gt 0 ]; do
7 case $1 in
8 -icon)
9 shift
10 srcicon=$1
11 ;;
12 -launch)
13 shift
14 srclaunch=$1
15 ;;
16 *)
17 echo "unexpected argument: $1"
18 exit 1
19 ;;
20 esac
21 shift
22 done
24 if [ ! -f "$srcicon" ]; then
25 echo "source icon ($srcicon) missing" >&2
26 exit 1
27 fi
28 if [ ! -f "$srclaunch" ]; then
29 echo "source launch screen ($srclaunch) missing" >&2
30 exit 1
31 fi
33 mkicon()
34 {
35 out=$1
36 sz=$2
38 echo "$srcicon -> $out (${sz}x${sz})"
39 convert $srcicon -resize $sz $out
40 }
42 mklaunch()
43 {
44 out=$1
45 xsz=$2
46 ysz=$3
48 echo "$srclaunch -> $out (${xsz}x${ysz})"
49 convert $srclaunch -resize ${xsz}x${ysz}^ \
50 -gravity Center -crop ${xsz}x${ysz}+0+0 +repage \
51 $out
52 }
54 echo "Generating icons ..."
55 # --- iphone spotlight icons
56 mkicon icon29.png 29 # Icon-Small
57 mkicon icon58.png 58 # Icon-Small@2x
58 mkicon icon87.png 87 # Icon-Small@3x
59 mkicon icon40.png 40 # Icon-Small-40
60 mkicon icon80.png 80 # Icon-Small-40@2x
61 mkicon icon120.png 120 # Icon-Small-40@3x
63 # --- iphone app icons
64 mkicon icon57.png 57 # Icon
65 mkicon icon114.png 114 # Icon@2x
66 mkicon icon120.png 120 # Icon-60@2x
67 mkicon icon180.png 180 # Icon-60@3x
69 # --- ipad spotlight (40 series plus the following)
70 mkicon icon50.png 50 # Icon-Small-50
71 mkicon icon100.png 100 # Icon-Small-50@2x
73 # --- ipad app icons
74 mkicon icon72.png 72 # Icon-72
75 mkicon icon144.png 144 # Icon-72@2x
76 mkicon icon76.png 76 # Icon-76
77 mkicon icon152.png 152 # Icon-76@2x
79 echo "Generating launch screens ..."
80 # iphone portrait launch screen images
81 mklaunch launch-1242x2208.png 1242 2208
82 mklaunch launch-750x1334.png 750 1334
83 mklaunch launch-640x960.png 640 960
84 mklaunch launch-640x1136.png 640 1136
85 mklaunch launch-320x480.png 320 480
86 mklaunch launch-640x960.png 640 960
87 mklaunch launch-640x1136.png 640 1136
90 # ipad portrait launch screen images
91 mklaunch launch-768x1024.png 768 1024
92 mklaunch launch-1536x2048.png 1536 2048
93 mklaunch launch-768x1004.png 768 1004
94 mklaunch launch-1536x2008.png 1536 2008