From: Martin Pitt Date: Sun, 1 Sep 2024 11:35:39 +0000 (+0200) Subject: scandoc: Convert to ImageMagic v7 CLI X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=c942f4a3ae7021887c946bb057687529f88b4e8b;p=bin.git scandoc: Convert to ImageMagic v7 CLI --- diff --git a/scandoc b/scandoc index ebbce60..3844e5c 100755 --- a/scandoc +++ b/scandoc @@ -13,10 +13,10 @@ echo "Output file directory: $D" PAGE=0 while true; do PAGE=$((PAGE+1)) - scanimage --device-name=genesys --format=png --progress --resolution 150 --mode Gray -x 210 -y 297 | convert -rotate 180 -modulate 120 -level 30,60% - cur.png + scanimage --device-name=genesys --format=png --progress --resolution 150 --mode Gray -x 210 -y 297 | magick - -rotate 180 -modulate 120 -level 30,60% cur.png FNAME=page`printf '%02i' $PAGE` pngquant 4 < cur.png > $FNAME.png - convert $FNAME.png $FNAME.pdf + magick $FNAME.png $FNAME.pdf echo "Insert next page and press Enter; q to stop" read x [ "$x" = q ] && break || true