From 97ed016a6b019468f75e3c5cc82d730481b1c615 Mon Sep 17 00:00:00 2001 From: Jan Jastrow Date: Tue, 16 Jul 2024 15:07:33 +0200 Subject: [PATCH] Increase JPEG quality --- zsh/scripts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zsh/scripts b/zsh/scripts index 45cb4fb..a06fc14 100644 --- a/zsh/scripts +++ b/zsh/scripts @@ -49,7 +49,7 @@ function pushover() { https://api.pushover.net/1/messages.json } -# png to jpg 85 +# png to jpg 95 function png2web() { findpath=$1 : "${findpath:="."}" @@ -57,13 +57,13 @@ function png2web() { dir=$(dirname "$f"); file=$(basename "$f"); name="${file%.*}"; - magick convert "$f" pnm:- | cjpeg -progressive -quality 85 > "$dir/$name.jpg" "$dir/$name.jpg" ' -background black -flatten TGA:- | cjpeg -targo -quality 75 -optimize -progressive -outfile "$1".jpg + magick "$1" -resize '1024x1024\>' -background black -flatten TGA:- | cjpeg -targo -quality 90 -optimize -progressive -outfile "$1".jpg } # Make PDFs look like scanned