X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=blobdiff_plain;f=bin%2Fbin%2Fscan.sh;h=d5c905feb48c57a1a4edf10e872f9ebd733ec30b;hp=3f47f893eeafa93385b12103ea28f976a8c1bd59;hb=48338303d760027e62bab963fa11a940bc0d97eb;hpb=3951f3e0893401e3ec8572bcb358018d2fafb1a6 diff --git a/bin/bin/scan.sh b/bin/bin/scan.sh index 3f47f89..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 \ @@ -43,15 +47,15 @@ do_next() { do_next while : ; do - echo -n "$cur: (v)iew r(otate) c(rop) (s)can (p)review (n)ext > " + echo -n "$cur: crop:$crop rotate:$rotate v/r/c/s/p/n> " 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)