From 640d8ab01b6763db2d120271230bc261b3cca2ec Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 7 Aug 2024 22:46:47 +0200 Subject: Use smaller cover images for front page. --- tools/gencovers.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'tools/gencovers.sh') diff --git a/tools/gencovers.sh b/tools/gencovers.sh index 5d4d244..454d69b 100644 --- a/tools/gencovers.sh +++ b/tools/gencovers.sh @@ -4,7 +4,7 @@ do B=$(echo $F | sed s/.jpg// | sed s/.png//) D=$(dirname $F) - if [ $F -nt $D/thumbnail.jpg ] + if [ $F -nt $D/thumbnail.png ] then PORTRAIT=$(convert $F -format '%[fx:w $B.1x.jpg - rm -f $B.1x.png - convert -colorspace RGB -resize $SIZE_2X $F -colorspace sRGB $B.2x.png - pngtopnm $B.2x.png | cjpeg -progressive -optimize -sample 1x1 -quality 95 > $B.2x.jpg - rm -f $B.2x.png - convert -colorspace RGB -resize $SIZE_TH $F -colorspace sRGB $D/thumbnail.png + fi + pngtopnm $D/thumbnail.png | cjpeg -progressive -optimize -sample 1x1 -quality 95 > $D/thumbnail.jpg - rm -f $D/thumbnail.png + pngtopnm $B.1x.png | cjpeg -progressive -optimize -sample 1x1 -quality 95 > $B.1x.jpg + pngtopnm $B.2x.png | cjpeg -progressive -optimize -sample 1x1 -quality 95 > $B.2x.jpg - fi done -- cgit v1.2.3