update thumbnail script
This commit is contained in:
parent
6bd70eb311
commit
d2a7bc86ac
4 changed files with 9 additions and 10 deletions
BIN
assets/files/hertzblatt/images/2022-1.jpg
(Stored with Git LFS)
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)
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)
BIN
assets/files/hertzblatt/images/2022-3.jpg
(Stored with Git LFS)
Binary file not shown.
|
|
@ -15,7 +15,7 @@ fi
|
|||
|
||||
pdfs=()
|
||||
|
||||
get_image_path () {
|
||||
get_image_path() {
|
||||
echo "$1" | sed -r 's/(.+)\/pdf\/([^/]+)\.pdf/\1\/images\/\2.jpg/'
|
||||
}
|
||||
|
||||
|
|
@ -34,9 +34,8 @@ if [ "$n" == "0" ]; then
|
|||
else
|
||||
for file in "${pdfs[@]}"; do
|
||||
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"
|
||||
i=$(( i + 1 ))
|
||||
i=$((i + 1))
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue