[sane-devel] Querying scanner buttons

Michael Piotrowski mxp@dynalabs.de
Mon, 29 Oct 2001 11:12:25 +0100


Hi,

I know this has already come up several times, but nevertheless...

I find that I quite often use shell scripts like the following:

  i=0
  while read; do
    i=$(($i + 1));
    scanimage --format tiff --resolution 300 \
              --halftoning "Text Enhanced Technology" \
              -x 200mm -y 275mm > out$i.tiff;
  done

Afterwards I combine all the images into one multi-page TIFF.  This
approach is very handy to capture magazine articles for archival.

Now, since my EPSON 1640 scanner has a button, it would be nice if I
could "read" it in the script above instead of having to hit Return on
the keyboard (which is sometimes difficult while trying to make sure
that the source on the scanner doesn't move).

I know that it would probably be conceptually difficult to integrate
this functionality into the SANE API; I'm rather thinking of separate
utility that behaves just like read.

sensed <http://www.remote.org/frederik/projects/software/sane/> is
something that comes very close, but unfortunately, it's for Fujitsu
scanners only.

I guess that most of the necessary code is already available in SANE,
so that it shouldn't be too difficult to implement, right?  Maybe
someone has already done it?  Or working on it?

Hints and comments welcome!

-- 
Michael Piotrowski, M.A.                                  <mxp@dynalabs.de>