[sane-devel] Are "scanimage" options sequence dependent?

Jeff jffry at posteo.net
Tue May 15 07:22:20 BST 2018

Hallo Rainer,

On 14/05/18 21:11, Dr Rainer Woitok wrote:
> In the first call  the "--resolution" option  is specified  ahead of the
> "--source" option,  causing "scanimage"  to ignore the former and to use
> the default resolution of 75 dpi.  In the second call the "--resolution"
> option is specified after the "--source" option,  causing "scanimage" to
> accept it.
> I'm not at all sure  whether this is a bug or a feature,  but in case of
> the latter the bug is in  "man/man1/scanimage.1"  which completely fails
> to point out this unexpected behaviour ... :-)

scanimage is not the source of your problem. scanimage simply passes on
the scan options that the backend provides. Many such options depend
upon one another - e.g. if there are options --mode=b&w|grayscale|color
and --depth=1|8|16, then it would make sense for number of depths to be
dependent upon the mode.

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

This is where a GUI like gscan2pdf is useful, as the options are
automatically reloaded when the backend requests it.

BTW, gscan2pdf will also run your favourite open source OCR engine on
the images.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20180515/7f62fc99/attachment-0001.sig>

More information about the sane-devel mailing list