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