2

I have a lot of pictures to scan.

Is it possible, using linux and xsane, to write a script so that the computer will keep scanning, giving incremental filenames to the resulting files ?

I'd really like something that just keep scanning, or, even better, that waits for me to press any key to scan the next picture.

2
  • How does your scanner work? Since it won't help you much if it doesn't automatically takes the next picture :S
    – Ivo Flipse
    Aug 14, 2009 at 9:58
  • I want to scan, put the next image on the window, press a key, repeat. I found scanimage, maybe I'll write the script myself.
    – Manu
    Aug 14, 2009 at 10:00

1 Answer 1

7

Apparently the scanimage program has batch scanning built in, so no scriping is required:

scanimage --format=tiff --batch="/path/to/scanned_image-%d.tiff" --batch-prompt

See the man page for more info.

"The --batch options provide the features for scanning documents using document feeders."

"--batch [format] is used to specify the format of the filename that each page will be written to."

"--batch-prompt will ask for pressing RETURN before scanning a page. This can be used for scanning multiple pages without an automatic document feeder."

4
  • Wow, that's weird. The first image is correctly scanned, but once I press enter, the scanner makes a weird noise, and the scanning thingie moves very slowly ...
    – Manu
    Aug 14, 2009 at 11:48
  • I've created another question for that problem. superuser.com/questions/22776/…
    – Manu
    Aug 14, 2009 at 12:17
  • 1
    @nasseg: That should be --batch="/path/to/scanned_image-%d.tiff" - missing the equals gives an error.
    – Draemon
    Jan 8, 2012 at 21:25
  • Note that if you don't mention the document size (using -x and -y options of scanimage), all pages of the ADF may be seen as a single page. Apr 14, 2015 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .