From 07c633716beaae3429f99b92e51c37aa8e6cebff Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 4 Aug 2020 21:09:12 +0300 Subject: [PATCH] scan.sh preview workability again --- bin/bin/scan.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/bin/scan.sh b/bin/bin/scan.sh index 8479546..d5c905f 100755 --- a/bin/bin/scan.sh +++ b/bin/bin/scan.sh @@ -7,11 +7,15 @@ ctr=${1:-1} ctr=$(( $ctr - 1 )) scan() { - resolution=$1 + preview=$1 shift [ -z "$NEGATIVE" ] && src="Flatbed" || src="Transparency Adapter" [ -z "$NEGATIVE" ] && depth=8 || depth=16 [ -z "$NEGATIVE" ] && resolution=800 || resolution=1600 + if [ "$preview" = "yes" ]; then + depth=8 + resolution=150 + fi scanimage \ --format=pnm \ --mode=Color \ @@ -47,11 +51,11 @@ while : ; do read c case $c in v) - scan 150 --preview=yes + scan yes --preview=yes preview ;; s) - scan 1600 --preview=no --high-quality=yes + scan no --preview=no --high-quality=yes preview ;; p) -- 2.44.0