summaryrefslogtreecommitdiff
path: root/tools/sheets/montage.sh
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-07-29 11:47:03 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-01 16:11:21 +0200
commitd366757363ace00d0e95657a89b3660741fdcacc (patch)
tree66627258196001e3da972001e4a2af2e452e0ad4 /tools/sheets/montage.sh
parentaf856bac2db9e4887b621737efd3ae221d68dd35 (diff)
downloadwaterloo-campaign-1815-d366757363ace00d0e95657a89b3660741fdcacc.tar.gz
ASSETS
map75 - jpegli d3 map150 - mozjpeg q40
Diffstat (limited to 'tools/sheets/montage.sh')
-rw-r--r--tools/sheets/montage.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/sheets/montage.sh b/tools/sheets/montage.sh
new file mode 100644
index 0000000..b4c8691
--- /dev/null
+++ b/tools/sheets/montage.sh
@@ -0,0 +1,44 @@
+function mon2() {
+ TILE=$1
+ shift
+ OUT=$1
+ shift
+ LIST=
+ while (( "$#" ))
+ do
+ LIST="$LIST a$1.png b$1.png"
+ shift
+ done
+ montage -mode concatenate -tile $TILE $LIST $OUT
+}
+
+function mon1() {
+ TILE=$1
+ shift
+ OUT=$1
+ shift
+ LIST=
+ while (( "$#" ))
+ do
+ LIST="$LIST a$1.png"
+ shift
+ done
+ montage -mode concatenate -tile $TILE $LIST $OUT
+}
+
+mon2 2x sheet_misc_1200.png 6 12 13 23
+
+mon2 2x sheet_french1_1200.png 0 1 2 3 4 5 7 8 9 10 11
+mon2 2x sheet_anglo1_1200.png 14 15 16 20 21 22
+mon2 2x sheet_prussian1_1200.png 17 18 19 24 25 26
+
+mon1 1x sheet_french2_1200.png 27 28 29 35 36 37
+mon1 1x sheet_anglo2_1200.png 33 34 41 42
+mon1 1x sheet_prussian2_1200.png 30 31 32 38 39 40
+
+for F in sheet_*_1200.png
+do
+ OUT=$(echo $F | sed 's/_1200.png//')
+ pngtopnm "$F" | pnmdepth 65535 | pnmgamma -ungamma -srgbramp | pnmscale 0.0625 | pnmgamma -srgbramp | pnmtopng > ${OUT}_75.png
+ pngtopnm "$F" | pnmdepth 65535 | pnmgamma -ungamma -srgbramp | pnmscale 0.125 | pnmgamma -srgbramp | pnmtopng > ${OUT}_150.png
+done