497 lines
12 KiB
HTML
497 lines
12 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of sane-test</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>sane-test</H1>
|
|
Section: SANE Scanner Access Now Easy (5)<BR>Updated: 14 Jul 2008<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="ixAAB"></A>
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
sane-test - SANE backend for testing frontends
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The
|
|
<B>sane-test</B>
|
|
|
|
library implements a SANE (Scanner Access Now Easy) backend that allows
|
|
testing the SANE installation and SANE frontends. It provides access to a
|
|
(nearly) unlimited number of virtual devices. There is no support for real
|
|
scanners or cameras. However, the backend simulates scanning and setting
|
|
options.
|
|
<P>
|
|
|
|
The idea is not only to find bugs in frontends but also to show all
|
|
capabilities of SANE. Therefore
|
|
<B>sane-test</B>
|
|
|
|
implements functions and options that are not (or seldom) found in other
|
|
backends.
|
|
<P>
|
|
|
|
The backend is commented out in @CONFIGDIR@/dll.conf, so either the comment
|
|
character must be removed or the backend must be called explicitly. E.g.
|
|
`scanimage -d test' or `xscanimage test'.
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>SCAN MODE OPTIONS</H2>
|
|
|
|
Option
|
|
<B>mode</B>
|
|
|
|
selects the scan mode (Gray or Color).
|
|
<P>
|
|
|
|
Option
|
|
<B>depth</B>
|
|
|
|
determines the number of bits per sample (1. 8, or 16). Keep in mind, that
|
|
this value refers to the sample, not the pixel. So depth=16 results in 48
|
|
bits per pixel in color mode. The most usual combinations are mode=Gray,
|
|
depth=1 for lineart, mode=Gray, depth=8 for gray and mode=Color, depth=8 for
|
|
color mode. The combination of color and 1-bit mode is quite obscure (8
|
|
colors) but allowed in the SANE standard. However, the meaning of bits is not
|
|
defined. Currently 1 = high intensity and 0 = low intensity is used.
|
|
<P>
|
|
|
|
Setting option
|
|
<B>hand-scanner</B>
|
|
|
|
results in the test-backend behaving like a hand-scanner. Hand-scanners do
|
|
not know the image height a priori. Instead, they return a height of -1.
|
|
Setting this option allows one to test whether a frontend can handle this
|
|
correctly. This option also enables a fixed width of 11 cm.
|
|
<P>
|
|
|
|
Setting option
|
|
<B>three-pass</B>
|
|
|
|
simulates a three-pass scanner. Older color scanners needed to scan the image
|
|
once per color (reg/green/blue) to get the full image. Therefore, in this mode
|
|
three single frames are transmitted in color mode.
|
|
<P>
|
|
|
|
Option
|
|
<B>three-pass-order</B>
|
|
|
|
provides support for changing the order of the three frames (see option
|
|
three-pass above). A frontend should support all orders.
|
|
<P>
|
|
|
|
Option
|
|
<B>resolution</B>
|
|
|
|
sets the resolution of the image in dots per inch.
|
|
<P>
|
|
|
|
<P>
|
|
|
|
Option
|
|
<B>source</B>
|
|
|
|
can be used to simulate an Automatic Document Feeder (ADF). After 10 scans, the
|
|
ADF will be "empty".
|
|
<P>
|
|
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>SPECIAL OPTIONS</H2>
|
|
|
|
Option
|
|
<B>test-picture</B>
|
|
|
|
allows one to set the image that's returned to the frontend. While "Solid white"
|
|
and "Solid black" are quite obvious, the other options need some more
|
|
explanation. Color patterns are used to determine if all modes and their
|
|
colors are represented correctly by the frontend. The grid should look like the
|
|
same in every mode and resolution. A table of all the test pictures can be
|
|
found at: <A HREF="http://www.meier-geinitz.de/sane/test-backend/test-pictures.html.">http://www.meier-geinitz.de/sane/test-backend/test-pictures.html.</A>
|
|
<P>
|
|
|
|
If option
|
|
<B>invert-endianness</B>
|
|
|
|
is set, the upper and lower bytes of image data in 16 bit modes are exchanged.
|
|
This option can be used to test the 16 bit modes of frontends, e.g. if the
|
|
frontend uses the correct endianness.
|
|
<P>
|
|
|
|
If option
|
|
<B>read-limit</B>
|
|
|
|
is set, the maximum amount of data transferred with each call to sane_read() is
|
|
limited.
|
|
<P>
|
|
|
|
Option
|
|
<B>read-limit-size</B>
|
|
|
|
sets the limit for option read-limit. A low limit slows down scanning. It
|
|
can be used to detect errors in frontend that occur because of wrong
|
|
assumptions on the size of the buffer or timing problems.
|
|
<P>
|
|
|
|
Option
|
|
<B>read-delay</B>
|
|
|
|
enables delaying data to the frontend.
|
|
<P>
|
|
|
|
Option
|
|
<B>read-delay-duration</B>
|
|
|
|
selects the number of microseconds the backends waits after each transfer of a
|
|
buffer. This option is useful to find timing-related bugs, especially if
|
|
used over the network.
|
|
<P>
|
|
|
|
If option
|
|
<B>read-return-value</B>
|
|
|
|
is different from "Default", the selected status will be returned by every
|
|
call to sane_read(). This is useful to test the frontend's handling of the
|
|
SANE statuses.
|
|
<P>
|
|
|
|
If option
|
|
<B>ppl-loss</B>
|
|
|
|
is different from 0, it determines the number of pixels that are "lost" at the
|
|
end of each line. That means, lines are padded with unused data.
|
|
<P>
|
|
|
|
Option
|
|
<B>fuzzy-parameters</B>
|
|
|
|
selects that fuzzy (inexact) parameters are returned as long as the scan
|
|
hasn't been started. This option can be used to test if the frontend uses the
|
|
parameters it got before the start of the scan (which it shouldn't).
|
|
<P>
|
|
|
|
Option
|
|
<B>non-blocking</B>
|
|
|
|
determines if non-blocking IO for sane_read() should be used if supported by
|
|
the frontend.
|
|
<P>
|
|
|
|
If option
|
|
<B>select-fd</B>
|
|
|
|
is set, the backend offers a select filedescriptor for detecting if
|
|
sane_read() will return data.
|
|
<P>
|
|
|
|
If option
|
|
<B>enable-test-options</B>
|
|
|
|
is set, a fairly big list of options for testing the various SANE option
|
|
types is enabled.
|
|
<P>
|
|
|
|
Option
|
|
<B>print-options</B>
|
|
|
|
can be used to print a list of all options to standard error.
|
|
<P>
|
|
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>GEOMETRY OPTIONS</H2>
|
|
|
|
Option
|
|
<B>tl-x</B>
|
|
|
|
determines the top-left x position of the scan area.
|
|
<P>
|
|
|
|
Option
|
|
<B>tl-y</B>
|
|
|
|
determines the top-left y position of the scan area.
|
|
<P>
|
|
|
|
Option
|
|
<B>br-x</B>
|
|
|
|
determines the bottom-right x position of the scan area.
|
|
<P>
|
|
|
|
Option
|
|
<B>br-y</B>
|
|
|
|
determines the bottom-right y position of the scan area.
|
|
<P>
|
|
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>BOOL TEST OPTIONS</H2>
|
|
|
|
There are 6 bool test options in total. Each option is numbered. (3/6)
|
|
means: this is option 3 of 6. The numbering scheme is intended for easier
|
|
detection of options not displayed by the frontend (because of missing support
|
|
or bugs).
|
|
<P>
|
|
|
|
Option
|
|
<B>bool-soft-select-soft-detect</B>
|
|
|
|
(1/6) is a bool test option that has soft select and soft detect (and
|
|
advanced) capabilities. That's just a normal bool option.
|
|
<P>
|
|
|
|
Option
|
|
<B>bool-hard-select-soft-detect</B>
|
|
|
|
(2/6) is a bool test option that has hard select and soft detect (and
|
|
advanced) capabilities. That means the option can't be set by the frontend
|
|
but by the user (e.g. by pressing a button at the device).
|
|
<P>
|
|
|
|
Option
|
|
<B>bool-hard-select</B>
|
|
|
|
(3/6) is a bool test option that has hard select (and advanced) capabilities.
|
|
That means the option can't be set by the frontend but by the user (e.g. by
|
|
pressing a button at the device) and can't be read by the frontend.
|
|
<P>
|
|
|
|
Option
|
|
<B>bool-soft-detect</B>
|
|
|
|
(4/6) is a bool test option that has soft detect (and advanced)
|
|
capabilities. That means the option is read-only.
|
|
<P>
|
|
|
|
Option
|
|
<B>bool-soft-select-soft-detect-emulated</B>
|
|
|
|
(5/6) is a Bool test option that has soft select, soft detect, and emulated
|
|
(and advanced) capabilities.
|
|
<P>
|
|
|
|
Option
|
|
<B>bool-soft-select-soft-detect-auto</B>
|
|
|
|
(6/6) is a Bool test option that has soft select, soft detect, and automatic
|
|
(and advanced) capabilities. This option can be automatically set by the
|
|
backend.
|
|
<P>
|
|
|
|
<P>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>INT TEST OPTIONS</H2>
|
|
|
|
There are 6 int test options in total.
|
|
<P>
|
|
|
|
Option
|
|
<B>int</B>
|
|
|
|
(1/6) is an int test option with no unit and no constraint set.
|
|
<P>
|
|
|
|
Option
|
|
<B>int-constraint-range</B>
|
|
|
|
(2/6) is an int test option with unit pixel and constraint range set. Minimum
|
|
is 4, maximum 192, and quant is 2.
|
|
<P>
|
|
|
|
Option
|
|
<B>int-constraint-word-list</B>
|
|
|
|
(3/6) is an int test option with unit bits and constraint word list set.
|
|
<P>
|
|
|
|
Option
|
|
<B>int-constraint-array</B>
|
|
|
|
(4/6) is an int test option with unit mm and using an array without
|
|
constraints.
|
|
<P>
|
|
|
|
Option
|
|
<B>int-constraint-array-constraint-range</B>
|
|
|
|
(5/6) is an int test option with unit mm and using an array with a range
|
|
constraint. Minimum is 4, maximum 192, and quant is 2.
|
|
<P>
|
|
|
|
Option
|
|
<B>int-constraint-array-constraint-word-list</B>
|
|
|
|
(6/6) is an int test option with unit percent and using an array a word list
|
|
constraint.
|
|
<P>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>FIXED TEST OPTIONS</H2>
|
|
|
|
There are 3 fixed test options in total.
|
|
<P>
|
|
|
|
Option
|
|
<B>fixed</B>
|
|
|
|
(1/3) is a fixed test option with no unit and no constraint set.
|
|
<P>
|
|
|
|
Option
|
|
<B>fixed-constraint-range</B>
|
|
|
|
(2/3) is a fixed test option with unit microsecond and constraint range
|
|
set. Minimum is -42.17, maximum 32767.9999, and quant is 2.0.
|
|
<P>
|
|
|
|
Option
|
|
<B>fixed-constraint-word-list</B>
|
|
|
|
(3/3) is a Fixed test option with no unit and constraint word list set.
|
|
<P>
|
|
|
|
<P>
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>STRING TEST OPTIONS</H2>
|
|
|
|
There are 3 string test options in total.
|
|
<P>
|
|
|
|
Option
|
|
<B>string</B>
|
|
|
|
(1/3) is a string test option without constraint.
|
|
<P>
|
|
|
|
Option
|
|
<B>string-constraint-string-list</B>
|
|
|
|
(2/3) is a string test option with string list constraint.
|
|
<P>
|
|
|
|
Option
|
|
<B>string-constraint-long-string-list</B>
|
|
|
|
(3/3) is a string test option with string list constraint. Contains some more
|
|
entries...
|
|
<P>
|
|
|
|
<P>
|
|
<A NAME="lbAK"> </A>
|
|
<H2>BUTTON TEST OPTION</H2>
|
|
|
|
Option
|
|
<B>button</B>
|
|
|
|
(1/1) is a Button test option. Prints some text...
|
|
<P>
|
|
|
|
<P>
|
|
<A NAME="lbAL"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><I>@CONFIGDIR@/test.conf</I>
|
|
|
|
<DD>
|
|
The backend configuration file (see also description of
|
|
<B>SANE_CONFIG_DIR</B>
|
|
|
|
below). The initial values of most of the basic SANE options can be configured
|
|
in this file. A template containing all the default values is provided
|
|
together with this backend. One of the more interesting values may be
|
|
<B>number_of_devices</B>.
|
|
|
|
It can be used to check the frontend's ability to show a long list of devices.
|
|
The config values concerning resolution and geometry can be useful to test
|
|
the handling of big file sizes.
|
|
<P>
|
|
<DT id="2"><I>@LIBDIR@/libsane-test.a</I>
|
|
|
|
<DD>
|
|
The static library implementing this backend.
|
|
<DT id="3"><I>@LIBDIR@/libsane-test.so</I>
|
|
|
|
<DD>
|
|
The shared library implementing this backend (present on systems that
|
|
support dynamic loading).
|
|
</DL>
|
|
<A NAME="lbAM"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="4"><B>SANE_CONFIG_DIR</B>
|
|
|
|
<DD>
|
|
This environment variable specifies the list of directories that may
|
|
contain the configuration file. Under UNIX, the directories are
|
|
separated by a colon (`:'), under OS/2, they are separated by a
|
|
semi-colon (`;'). If this variable is not set, the configuration file
|
|
is searched in two default directories: first, the current working
|
|
directory (".") and then in @CONFIGDIR@. If the value of the
|
|
environment variable ends with the directory separator character, then
|
|
the default directories are searched after the explicitly specified
|
|
directories. For example, setting
|
|
<B>SANE_CONFIG_DIR</B>
|
|
|
|
to "/tmp/config:" would result in directories "tmp/config", ".", and
|
|
"@CONFIGDIR@" being searched (in this order).
|
|
<DT id="5"><B>SANE_DEBUG_TEST</B>
|
|
|
|
<DD>
|
|
If the library was compiled with debug support enabled, this
|
|
environment variable controls the debug level for this backend. Higher
|
|
debug levels increase the verbosity of the output.
|
|
<P>
|
|
Example:
|
|
export SANE_DEBUG_TEST=4
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAN"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?7+sane">sane</A>(7),
|
|
<I><A HREF="http://www.meier-geinitz.de/sane/test-backend/">http://www.meier-geinitz.de/sane/test-backend/</A></I>
|
|
|
|
<P>
|
|
<P>
|
|
<A NAME="lbAO"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Henning Meier-Geinitz <<A HREF="mailto:henning@meier-geinitz.de">henning@meier-geinitz.de</A>>
|
|
<P>
|
|
<A NAME="lbAP"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
- config file values aren't tested for correctness
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="7"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="8"><A HREF="#lbAD">SCAN MODE OPTIONS</A><DD>
|
|
<DT id="9"><A HREF="#lbAE">SPECIAL OPTIONS</A><DD>
|
|
<DT id="10"><A HREF="#lbAF">GEOMETRY OPTIONS</A><DD>
|
|
<DT id="11"><A HREF="#lbAG">BOOL TEST OPTIONS</A><DD>
|
|
<DT id="12"><A HREF="#lbAH">INT TEST OPTIONS</A><DD>
|
|
<DT id="13"><A HREF="#lbAI">FIXED TEST OPTIONS</A><DD>
|
|
<DT id="14"><A HREF="#lbAJ">STRING TEST OPTIONS</A><DD>
|
|
<DT id="15"><A HREF="#lbAK">BUTTON TEST OPTION</A><DD>
|
|
<DT id="16"><A HREF="#lbAL">FILES</A><DD>
|
|
<DT id="17"><A HREF="#lbAM">ENVIRONMENT</A><DD>
|
|
<DT id="18"><A HREF="#lbAN">SEE ALSO</A><DD>
|
|
<DT id="19"><A HREF="#lbAO">AUTHOR</A><DD>
|
|
<DT id="20"><A HREF="#lbAP">BUGS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:05 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|