diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-03-23 23:03:51 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-03-23 23:03:51 +0100 |
| commit | df1c1afc80711b08927fd7968adaf4de5349df10 (patch) | |
| tree | 8b9ec9595fcc7ef2811fbfb6e807dc1aaa1a710e /admin | |
| parent | ea06e107f2ab831de4f9c69c3917541b2fc52e1a (diff) | |
| download | quatuorbellefeuille.com-df1c1afc80711b08927fd7968adaf4de5349df10.tar.xz | |
Use Pierre's re-tinted portraits
Really need to put those srcsets in, those portraits are huge.
Diffstat (limited to 'admin')
| -rwxr-xr-x | admin/prep-member-photos.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/admin/prep-member-photos.sh b/admin/prep-member-photos.sh new file mode 100755 index 0000000..644b93f --- /dev/null +++ b/admin/prep-member-photos.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -euxo pipefail + +processimg () +{ + local src=$1 + local name=$(basename "${src}") + name="${name%% *}" + name=${name,} + local dst=../images/${name}/portrait.png + + magick "${src}" -scale 1200x ${dst} + for size in 800 400 + do + magick ${dst} -scale ${size}x ${dst/.png/${size}.png} + done +} + +for img in "$@" +do + processimg "${img}" & +done + +wait |
