diff --git a/sample_data/background.png b/sample_data/cards/background.png similarity index 100% rename from sample_data/background.png rename to sample_data/cards/background.png diff --git a/sample_data/cards/background_860px.png b/sample_data/cards/background_860px.png new file mode 100644 index 0000000..f1b2908 Binary files /dev/null and b/sample_data/cards/background_860px.png differ diff --git a/sample_data/cards/generate_card.sh b/sample_data/cards/generate_card.sh new file mode 100755 index 0000000..aabb26d --- /dev/null +++ b/sample_data/cards/generate_card.sh @@ -0,0 +1,12 @@ +#!/bin/bash +mkdir -p output + +for img in input/*.{jpg,png}; do + [ -e "$img" ] || continue # skip if no files + name=$(basename "${img%.*}").jpg + magick convert background.png \ + \( "$img" -resize x820 \) \ + -gravity center -composite \ + -quality 85 -sampling-factor 4:4:4 \ + "output/$name" +done