[sane-devel] Are "scanimage" options sequence dependent?
Dr Rainer Woitok
rainer.woitok at gmail.com
Tue May 15 11:52:26 BST 2018
Jeff,
On Tuesday, 2018-05-15 08:22:20 +0200, you wrote:
> ...
> If you are only using scanimage then you can only find the dependencies
> out by trial and error, using the --help output for each different
> combination of options. i.e. the output from:
>
> scanimage --depth=1 --mode=color --help
>
> in my example above is likely to be different from
>
> scanimage --mode=color --depth=1 --help
You are right, and thanks for this information. This is what I dubbed
the bug in "man/man1/scanimage1" in my last mail: there should be a big
hint that options already specified might influence what other options
are still specifyable and how to find that out.
But I still regard this specific behaviour a bug in either "scanimage"
or the "pixma" backend. There is absolutely nothing in that help output
indicating that "--resolution" must not be specified before "--source"
(and with respect to these two particular options there isn't any reason
for such a restriction either):
$ scanimage --device pixma:MX880_192.168.2.199 --format tiff --mode Color \
--resolution 300 --help > /tmp/help1
$ scanimage --device pixma:MX880_192.168.2.199 --format tiff --mode Color \
--source Flatbed --help > /tmp/help2
$ diff -du /tmp/help1 /tmp/help2
--- /tmp/help1 2018-05-15 11:17:25.756748641 +0200
+++ /tmp/help2 2018-05-15 11:17:51.657527337 +0200
@@ -34,7 +34,7 @@
Options specific to device `pixma:MX880_192.168.2.199':
Scan mode:
- --resolution auto||75|150|300|600|1200|2400dpi [300]
+ --resolution auto||75|150|300|600|1200|2400dpi [75]
Sets the resolution of the scanned image.
--mode auto|Color|Gray|Lineart [Color]
Selects the scan mode (e.g., lineart, monochrome, or color).
> This is where a GUI like gscan2pdf is useful, as the options are
> automatically reloaded when the backend requests it.
You know that I know "gscan2pdf". But its user interface currently is
not customizable enough for my purpose:
- I want to preprocess my scans using "empty-page" [1] and "textde-
scew" [2],
- if at all I want "unpaper" to only improve the OCR process but not
to spoil my scan (like the temporary black and white image "gscan2-
pdf" is using only for OCR-ing without turning the scan itself into
black and white),
- and I do not want having to remember each time I switch between "ADF
single sided" and "ADF double sided" to also manually check or un-
check the box "Rotate Reverse Side by 180 degrees".
I only use a limited set of options like colour vs grey, 300 dpi vs 600
dpi, flatbed vs ADF simplex vs ADF duplex, and this can more easily be
controlled from the command line.
Sincerely,
Rainer
[1] https://exactcode.com/opensource/exactimage/
[2] http://www.fmwconcepts.com/imagemagick/index.php
More information about the sane-devel
mailing list