-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathgenerate-images.sh
executable file
·38 lines (35 loc) · 1.44 KB
/
generate-images.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
#!/bin/bash
rm images/*.png
for file in $(cd svg && ls *.svg); do
filename=${file%%.svg}
echo "Rasterizing $filename..."
convert \
-density 1200 \
-resize 18x18 \
-background none \
svg/$file images/$filename.png
convert \
-density 1200 \
-resize 36x36 \
-background none \
svg/$file images/[email protected]
done
echo 'Creating ICNS...'
convert \
-density 1200 \
-resize 1024x1024 \
-background none \
svg/menuActive.svg images/DockerMenu.png
mkdir images/DockerMenu.iconset
sips -z 16 16 images/DockerMenu.png --out images/DockerMenu.iconset/icon_16x16.png
sips -z 32 32 images/DockerMenu.png --out images/DockerMenu.iconset/[email protected]
sips -z 32 32 images/DockerMenu.png --out images/DockerMenu.iconset/icon_32x32.png
sips -z 64 64 images/DockerMenu.png --out images/DockerMenu.iconset/[email protected]
sips -z 128 128 images/DockerMenu.png --out images/DockerMenu.iconset/icon_128x128.png
sips -z 256 256 images/DockerMenu.png --out images/DockerMenu.iconset/[email protected]
sips -z 256 256 images/DockerMenu.png --out images/DockerMenu.iconset/icon_256x256.png
sips -z 512 512 images/DockerMenu.png --out images/DockerMenu.iconset/[email protected]
sips -z 512 512 images/DockerMenu.png --out images/DockerMenu.iconset/icon_512x512.png
cp images/DockerMenu.png images/DockerMenu.iconset/[email protected]
iconutil -c icns images/DockerMenu.iconset
rm -R images/DockerMenu.iconset