1
0
Fork 0

update thumbnail script

This commit is contained in:
Malte Jürgens 2022-10-07 20:13:20 +02:00
parent 6bd70eb311
commit d2a7bc86ac
Signed by: maltejur
GPG key ID: D29FBD5F93C0CFC3
4 changed files with 9 additions and 10 deletions

BIN
assets/files/hertzblatt/images/2022-1.jpg (Stored with Git LFS)

Binary file not shown.

BIN
assets/files/hertzblatt/images/2022-2.jpg (Stored with Git LFS)

Binary file not shown.

BIN
assets/files/hertzblatt/images/2022-3.jpg (Stored with Git LFS)

Binary file not shown.

View file

@ -15,7 +15,7 @@ fi
pdfs=() pdfs=()
get_image_path () { get_image_path() {
echo "$1" | sed -r 's/(.+)\/pdf\/([^/]+)\.pdf/\1\/images\/\2.jpg/' echo "$1" | sed -r 's/(.+)\/pdf\/([^/]+)\.pdf/\1\/images\/\2.jpg/'
} }
@ -34,9 +34,8 @@ if [ "$n" == "0" ]; then
else else
for file in "${pdfs[@]}"; do for file in "${pdfs[@]}"; do
printf "Generating Thumbnail $i/$n for $file... " printf "Generating Thumbnail $i/$n for $file... "
convert -resize 500x700! -colorspace RGB -density 96 -quality 85 "$file[0]" "$(get_image_path "$file")" convert -resize 500x700! -colorspace RGB -density 96 -quality 85 -background white -alpha remove "$file[0]" "$(get_image_path "$file")"
printf "Done\n" printf "Done\n"
i=$(( i + 1 )) i=$((i + 1))
done done
fi fi