diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-03-23 22:23:48 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-03-23 22:35:45 +0100 |
| commit | ea06e107f2ab831de4f9c69c3917541b2fc52e1a (patch) | |
| tree | c9e58e8cedffc956dfcaed44606ce48bbafe1475 /admin/prep-quartet-photos.sh | |
| parent | 476d314bb48a643a6123e9dcb11943dbd00048db (diff) | |
| download | quatuorbellefeuille.com-ea06e107f2ab831de4f9c69c3917541b2fc52e1a.tar.xz | |
Use Pierre's re-tinted photos
Diffstat (limited to 'admin/prep-quartet-photos.sh')
| -rwxr-xr-x | admin/prep-quartet-photos.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/admin/prep-quartet-photos.sh b/admin/prep-quartet-photos.sh new file mode 100755 index 0000000..fa5264f --- /dev/null +++ b/admin/prep-quartet-photos.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -euxo pipefail + +declare -A heights=( + [sophie]=1100 + [hervé]=1125 + [enguerrand]=1175 + [david]=1200 +) + +processimg () +{ + local src=$1 + local name=$(basename "${src}") + name="${name%% *}" + name=${name,} + local dst=../images/${name}/full.png + local height=${heights[${name}]} + + magick "${src}" -trim ${dst} + magick ${dst} -scale x${height} ${dst} + magick ${dst} -background none -gravity north -splice 0x$((1200-height)) ${dst} +} + +for img in "$@" +do + processimg "${img}" & +done + +wait |
