aboutsummaryrefslogtreecommitdiff
path: root/generate.sh
blob: d1737fb757e58d613c626514094e5e541f1591ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# invoke as ./generate.sh FILENAME
# it is used to generate smaller versions from the one found in scalable



FILE=${1#scalable/}
PATH=$(dirname $FILE)

for VERSION in 16x16 32x32 48x48 64x64 128x128 256x256
do
  /bin/mkdir -p "cache/$VERSION/$PATH"
done


/usr/bin/convert $1 \
  \( -clone 0 -resize 16x16 -write cache/16x16/$FILE \) \
  \( -clone 0 -resize 32x32 -write cache/32x32/$FILE \) \
  \( -clone 0 -resize 48x48 -write cache/48x48/$FILE \) \
  \( -clone 0 -resize 64x64 -write cache/64x64/$FILE \) \
  \( -clone 0 -resize 128x128 -write cache/128x128/$FILE \) \
  \( -clone 0 -resize 256x256 -write cache/256x256/$FILE \) \
  null:

..