Configuration file for scanimage?

Is there a configuration file for scanimage which comes with graphics/sane-backends? Or which is the default one, or one to use?

Other command line programs have configuration file(s) in /usr/local/etc/. I want to set default DPI, color or grayscale, scan width/height, and image type without using a script. This program has plenty in /usr/local/etc/sane.d/.

I found settings in test.conf, but there aren't instructions on how to use this, or which custom file I should use. There's so many files, I don't know which to use.
Code:
# Bit depth (1, 8, 16)
depth 8

# Resolution (dpi)
resolution_min 1.0
resolution_max 1200.0
resolution_quant 1.0
resolution 50.0
and there's other geometry settings there.

I was going by command line, with scanimage -p --mode Gray --resolution 75 -o customnamedscanfile.jpg. Then, if I need a higher DPI, color, or different image format, I can enter that manually, unless I can have a custom file for both.

Thread scanimage-cuts-off-letter-size-image-xsane-doesnt.78967 shows a few more command line options. It had ones I needed for width and length of image scan:
As most of my scanning is to pdf, I found a little script that works well to scan, and turn to pdf. It saves me from opening xsane and going through the various steps.
Code:
#!/bin/sh
scanimage -p --mode Gray|pnmtops -imageheight 11 -imagewidth 8.5|ps2pdf - $1
This works well with my Samsung C460 MFC printer scanner. In contrast, a friend on another forum found that for his Epsom, it didn't work well, and he used hp-scan. Anyway, figured I'd pass it along in case it's of use to someone.

The answer may be simple, but there's confusion in so many conf files, and how and which ones are used.
 
To use the test.conf file, use scanimage -T. I still need to learn which one sets the conf file. I'm not sure if a conf option for this is available. Documentation is lacking, and there's not enough simplicity in this program, like there are in other programs.

I added the directory that contains scan.sh to my shell, so I can use the command without typing the whole directory.
Code:
#!/bin/sh
scanimage -p --mode Gray --resolution 75 -y 279.4 --format jpeg -o $1.jpg
When I type scan.sh file, it scans and outputs it to this name with .jpg appended automatically at the end of it. The height is in millimeters for 11". For scans where I may need more detail or color, I can make another shell script, or just type out the command.
 
Back
Top