Just use convert in thumbnail script

This commit is contained in:
Matt Borgerson 2020-10-26 13:40:18 -07:00
parent 902d5d5f68
commit 534be1edea

View File

@ -1,12 +1,9 @@
#!/bin/bash -ex #!/bin/bash -ex
INPUT=$1 INPUT=$1
OUTPUT_RESIZED=`dirname $1`/cover_front_thumbnail_tmp.png
OUTPUT_COMPRESSED=`dirname $1`/cover_front_thumbnail.jpg OUTPUT_COMPRESSED=`dirname $1`/cover_front_thumbnail.jpg
if [[ -e "$OUTPUT_COMPRESSED" ]]; then if [[ -e "$OUTPUT_COMPRESSED" ]]; then
echo "$OUTPUT_COMPRESSED already exists" echo "$OUTPUT_COMPRESSED already exists"
exit 0 exit 0
fi fi
echo "CONVERTING $INPUT" echo "CONVERTING $INPUT"
convert $INPUT -quality 100 -resize 256 -density 72x72 $OUTPUT_RESIZED convert $INPUT -quality 85 -resize 256 -density 72x72 $OUTPUT_COMPRESSED
./guetzli/bin/Release/guetzli $OUTPUT_RESIZED $OUTPUT_COMPRESSED
rm $OUTPUT_RESIZED