diff --git a/.scripts/generate_tumbnails.sh b/.scripts/generate_tumbnails.sh index 389116b..3bd6cb1 100755 --- a/.scripts/generate_tumbnails.sh +++ b/.scripts/generate_tumbnails.sh @@ -28,6 +28,7 @@ thumbnail(){ jpegq=75 webpq=55 cavifq=35 + pngq="60-90" # Si une image est un thumbnail on la considère comme déjà bien traitée. if [[ $2 == *".thumb."* ]]; then @@ -56,6 +57,7 @@ thumbnail(){ pngcrush -warn "$2" "$2.tmp" mv -f "$2.tmp" "$2" /usr/bin/convert -resize $maxwidth\> "$2" "$thumbname" + /usr/bin/pngquant --quality=$pngq --skip-if-larger --force --transbug "$thumbname" -o "$thumbname" /usr/bin/convert -resize $maxwidth\> -quality $webpq "$2" "$thumbwebpname" pngcrush -warn "$thumbname" "$thumbname.tmp" mv -f "$thumbname.tmp" "$thumbname"