diff options
Diffstat (limited to 'tools/gencovers.sh')
-rw-r--r-- | tools/gencovers.sh | 15 |
1 files changed, 6 insertions, 9 deletions
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<h]' info:) @@ -30,17 +30,14 @@ do SIZE_TH=120x120! fi + convert -colorspace RGB -resize $SIZE_TH $F -colorspace sRGB $D/thumbnail.png convert -colorspace RGB -resize $SIZE_1X -colorspace sRGB $F $B.1x.png - pngtopnm $B.1x.png | cjpeg -progressive -optimize -sample 1x1 -quality 95 > $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 |