mirror of
https://github.com/daniviga/django-ram.git
synced 2025-12-26 07:18:32 +01:00
Add some utils to generate cards via imagemagick
This commit is contained in:
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
sample_data/cards/background_860px.png
Normal file
BIN
sample_data/cards/background_860px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
12
sample_data/cards/generate_card.sh
Executable file
12
sample_data/cards/generate_card.sh
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user