From ea06e107f2ab831de4f9c69c3917541b2fc52e1a Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Tue, 23 Mar 2021 22:23:48 +0100 Subject: Use Pierre's re-tinted photos --- admin/prep-quartet-photos.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 admin/prep-quartet-photos.sh (limited to 'admin') 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 -- cgit v1.2.3