diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-10-22 12:53:57 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-19 00:05:34 +0100 |
commit | 719d61982953caf61c0df7776347e13105a2e8b2 (patch) | |
tree | 4e11a9d0c502264f4169de97914fca6ccaf9ef22 /tools/build_stickers.sh | |
parent | 8d8d6db547653dff6ffb34fdf9336317da50121e (diff) | |
download | nevsky-719d61982953caf61c0df7776347e13105a2e8b2.tar.gz |
Add asset rendering scripts.
Diffstat (limited to 'tools/build_stickers.sh')
-rw-r--r-- | tools/build_stickers.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/build_stickers.sh b/tools/build_stickers.sh new file mode 100644 index 0000000..3e49e69 --- /dev/null +++ b/tools/build_stickers.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +set -x + +#gs -sDEVICE=png16m -r1200 -o tmp/stickers1200.png ../HIRES/stickers3.pdf + +mkdir -p tmp + +# 672x672 stickers @1200 +#pngtopnm tmp/stickers1200.png > tmp/stickers1200.ppm +pnmcut -top 1912 -height 672 tmp/stickers1200.ppm > tmp/row1x.ppm +pnmcut -top 2856 -height 672 tmp/stickers1200.ppm > tmp/row2x.ppm + +I=1 +for LEFT in 405 641 877 1113 1349 1586 1822 +do + pnmcut -left $(expr 4 '*' $LEFT) -width 672 tmp/row1x.ppm | pnmtopng > tmp/lord_teutonic_$I.png + pnmcut -left $(expr 4 '*' $LEFT) -width 672 tmp/row2x.ppm | pnmtopng > tmp/lord_russian_$I.png + I=$(expr $I + 1) +done + +# 150dpi -> 84x84 +# 75dpi -> 42x42 +# 3d -> 42x28 +for I in 1 2 3 4 5 6 7 +do + convert tmp/lord_teutonic_$I.png -colorspace RGB -geometry 84x56! -colorspace sRGB output150/lord_teutonic_${I}_3d.png + convert tmp/lord_russian_$I.png -colorspace RGB -geometry 84x56! -colorspace sRGB output150/lord_russian_${I}_3d.png + convert tmp/lord_teutonic_$I.png -colorspace RGB -geometry 84x84! -colorspace sRGB output150/lord_teutonic_${I}.png + convert tmp/lord_russian_$I.png -colorspace RGB -geometry 84x84! -colorspace sRGB output150/lord_russian_${I}.png + + convert tmp/lord_teutonic_$I.png -colorspace RGB -geometry 42x28! -colorspace sRGB output75/lord_teutonic_${I}_3d.png + convert tmp/lord_russian_$I.png -colorspace RGB -geometry 42x28! -colorspace sRGB output75/lord_russian_${I}_3d.png + convert tmp/lord_teutonic_$I.png -colorspace RGB -geometry 42x42! -colorspace sRGB output75/lord_teutonic_${I}.png + convert tmp/lord_russian_$I.png -colorspace RGB -geometry 42x42! -colorspace sRGB output75/lord_russian_${I}.png +done + |