istereo2
view ios/icons/mkicons @ 16:1b7776cb800b
ios version done
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 01 Oct 2015 07:54:57 +0300 |
parents | dc735bdeeb8a |
children |
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
53 echo "rotating for landscape-$out (${ysz}x${xsz})"
54 convert $out -rotate 90 landscape-$out
55 }
57 echo "Generating icons ..."
58 # --- iphone spotlight icons
59 mkicon icon29.png 29 # Icon-Small
60 mkicon icon58.png 58 # Icon-Small@2x
61 mkicon icon87.png 87 # Icon-Small@3x
62 mkicon icon40.png 40 # Icon-Small-40
63 mkicon icon80.png 80 # Icon-Small-40@2x
64 mkicon icon120.png 120 # Icon-Small-40@3x
66 # --- iphone app icons
67 mkicon icon57.png 57 # Icon
68 mkicon icon114.png 114 # Icon@2x
69 mkicon icon120.png 120 # Icon-60@2x
70 mkicon icon180.png 180 # Icon-60@3x
72 # --- ipad spotlight (40 series plus the following)
73 mkicon icon50.png 50 # Icon-Small-50
74 mkicon icon100.png 100 # Icon-Small-50@2x
76 # --- ipad app icons
77 mkicon icon72.png 72 # Icon-72
78 mkicon icon144.png 144 # Icon-72@2x
79 mkicon icon76.png 76 # Icon-76
80 mkicon icon152.png 152 # Icon-76@2x
82 echo "Generating launch screens ..."
83 # iphone portrait launch screen images
84 mklaunch launch-1242x2208.png 1242 2208
85 mklaunch launch-750x1334.png 750 1334
86 mklaunch launch-640x960.png 640 960
87 mklaunch launch-640x1136.png 640 1136
88 mklaunch launch-320x480.png 320 480
89 mklaunch launch-640x960.png 640 960
90 mklaunch launch-640x1136.png 640 1136
93 # ipad portrait launch screen images
94 mklaunch launch-768x1024.png 768 1024
95 mklaunch launch-1536x2048.png 1536 2048
96 mklaunch launch-768x1004.png 768 1004
97 mklaunch launch-1536x2008.png 1536 2008