diff options
Diffstat (limited to 'tools/gencovers.sh')
-rw-r--r-- | tools/gencovers.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/gencovers.sh b/tools/gencovers.sh index 8d4eacd..5d4d244 100644 --- a/tools/gencovers.sh +++ b/tools/gencovers.sh @@ -4,6 +4,9 @@ do B=$(echo $F | sed s/.jpg// | sed s/.png//) D=$(dirname $F) + if [ $F -nt $D/thumbnail.jpg ] + then + PORTRAIT=$(convert $F -format '%[fx:w<h]' info:) SQUARE=$(convert $F -format '%[fx:w=h]' info:) @@ -38,4 +41,6 @@ do convert -colorspace RGB -resize $SIZE_TH $F -colorspace sRGB $D/thumbnail.png pngtopnm $D/thumbnail.png | cjpeg -progressive -optimize -sample 1x1 -quality 95 > $D/thumbnail.jpg rm -f $D/thumbnail.png + + fi done |