1sane-test(5)             SANE Scanner Access Now Easy             sane-test(5)
2
3
4

NAME

6       sane-test - SANE backend for testing frontends
7

DESCRIPTION

9       The sane-test library implements a SANE (Scanner Access Now Easy) back‐
10       end that allows testing the SANE installation and SANE  frontends.   It
11       provides  access  to  a  (nearly)  unlimited number of virtual devices.
12       There is no support for real scanners or cameras.  However, the backend
13       simulates scanning and setting options.
14
15       The  idea  is  not  only to find bugs in frontends but also to show all
16       capabilities of SANE.  Therefore  sane-test  implements  functions  and
17       options that are not (or seldom) found in other backends.
18
19       The  backend  is  commented  out in /etc/sane.d/dll.conf, so either the
20       comment character must be removed or the backend must be called explic‐
21       itly.  E.g.  scanimage -d test or xscanimage test.
22
23
24

SCAN MODE OPTIONS

26       Option mode selects the scan mode (Gray or Color).
27
28       Option  depth  determines  the number of bits per sample (1. 8, or 16).
29       Keep in mind, that this value refers to the sample, not the pixel.   So
30       depth=16  results  in  48  bits per pixel in color mode. The most usual
31       combinations are mode=Gray, depth=1 for lineart, mode=Gray, depth=8 for
32       gray  and mode=Color, depth=8 for color mode.  The combination of color
33       and 1-bit mode is quite obscure (8 colors)  but  allowed  in  the  SANE
34       standard.  However,  the  meaning of bits is not defined. Currently 1 =
35       high intensity and 0 = low intensity is used.
36
37       Setting option hand-scanner results in the test-backend behaving like a
38       hand-scanner.   Hand-scanners  do  not  know the image height a priori.
39       Instead, they return a height of -1.  Setting this option allows one to
40       test  whether  a  frontend can handle this correctly.  This option also
41       enables a fixed width of 11 cm.
42
43       Setting option three-pass simulates a three-pass scanner.  Older  color
44       scanners  needed  to  scan the image once per color (reg/green/blue) to
45       get the full image.  Therefore, in this mode three  single  frames  are
46       transmitted in color mode.
47
48       Option  three-pass-order provides support for changing the order of the
49       three frames (see option three-pass above).  A frontend should  support
50       all orders.
51
52       Option resolution sets the resolution of the image in dots per inch.
53
54       Option  source  can  be  used  to simulate an Automatic Document Feeder
55       (ADF). After 10 scans, the ADF will be "empty".
56

SPECIAL OPTIONS

58       Option test-picture allows one to set the image that's returned to  the
59       frontend.  While "Solid white" and "Solid black" are quite obvious, the
60       other options need some more explanation.  Color patterns are  used  to
61       determine  if  all  modes and their colors are represented correctly by
62       the frontend.  The grid should look like the same  in  every  mode  and
63       resolution.   A  table  of  all  the  test  pictures  can  be found at:
64       http://www.meier-geinitz.de/sane/test-backend/test-pictures.html.
65
66       If option invert-endianness is set, the upper and lower bytes of  image
67       data  in  16  bit modes are exchanged.  This option can be used to test
68       the 16 bit modes of frontends, e.g. if the frontend  uses  the  correct
69       endianness.
70
71       If  option  read-limit  is  set, the maximum amount of data transferred
72       with each call to sane_read() is limited.
73
74       Option read-limit-size sets the limit for  option  read-limit.   A  low
75       limit slows down scanning.  It can be used to detect errors in frontend
76       that occur because of wrong assumptions on the size of  the  buffer  or
77       timing problems.
78
79       Option read-delay enables delaying data to the frontend.
80
81       Option read-delay-duration selects the number of microseconds the back‐
82       ends waits after each transfer of a buffer.  This option is  useful  to
83       find timing-related bugs, especially if used over the network.
84
85       If  option  read-return-value is different from "Default", the selected
86       status will be returned by every call to sane_read().  This  is  useful
87       to test the frontend's handling of the SANE statuses.
88
89       If  option  ppl-loss  is  different from 0, it determines the number of
90       pixels that are "lost" at the end of each line.  That means, lines  are
91       padded with unused data.
92
93       Option  fuzzy-parameters  selects  that  fuzzy (inexact) parameters are
94       returned as long as the scan hasn't been started.  This option  can  be
95       used  to  test  if  the  frontend uses the parameters it got before the
96       start of the scan (which it shouldn't).
97
98       Option non-blocking  determines  if  non-blocking  IO  for  sane_read()
99       should be used if supported by the frontend.
100
101       If  option select-fd is set, the backend offers a select filedescriptor
102       for detecting if sane_read() will return data.
103
104       If option enable-test-options is set, a fairly big list of options  for
105       testing the various SANE option types is enabled.
106
107       Option  print-options  can  be  used  to print a list of all options to
108       standard error.
109

GEOMETRY OPTIONS

111       Option tl-x determines the top-left x position of the scan area.
112
113       Option tl-y determines the top-left y position of the scan area.
114
115       Option br-x determines the bottom-right x position of the scan area.
116
117       Option br-y determines the bottom-right y position of the scan area.
118

BOOL TEST OPTIONS

120       There are 6 bool test options  in  total.   Each  option  is  numbered.
121       (3/6)  means:  this is option 3 of 6.  The numbering scheme is intended
122       for easier detection of options not displayed by the frontend  (because
123       of missing support or bugs).
124
125       Option  bool-soft-select-soft-detect  (1/6)  is a bool test option that
126       has soft select and soft detect (and  advanced)  capabilities.   That's
127       just a normal bool option.
128
129       Option  bool-hard-select-soft-detect  (2/6)  is a bool test option that
130       has hard select and soft  detect  (and  advanced)  capabilities.   That
131       means  the option can't be set by the frontend but by the user (e.g. by
132       pressing a button at the device).
133
134       Option bool-hard-select (3/6) is a  bool  test  option  that  has  hard
135       select (and advanced) capabilities.  That means the option can't be set
136       by the frontend but by the user (e.g.  by  pressing  a  button  at  the
137       device) and can't be read by the frontend.
138
139       Option  bool-soft-detect  (4/6)  is  a  bool  test option that has soft
140       detect (and advanced) capabilities.  That means  the  option  is  read-
141       only.
142
143       Option  bool-soft-select-soft-detect-emulated  (5/6)  is  a  Bool  test
144       option that has soft select, soft detect, and emulated  (and  advanced)
145       capabilities.
146
147       Option  bool-soft-select-soft-detect-auto  (6/6)  is a Bool test option
148       that has soft select, soft detect, and automatic (and  advanced)  capa‐
149       bilities.  This option can be automatically set by the backend.
150

INT TEST OPTIONS

152       There are 6 int test options in total.
153
154       Option  int  (1/6) is an int test option with no unit and no constraint
155       set.
156
157       Option int-constraint-range (2/6) is an int test option with unit pixel
158       and constraint range set.  Minimum is 4, maximum 192, and quant is 2.
159
160       Option  int-constraint-word-list  (3/6) is an int test option with unit
161       bits and constraint word list set.
162
163       Option int-constraint-array (4/6) is an int test option  with  unit  mm
164       and using an array without constraints.
165
166       Option  int-constraint-array-constraint-range  (5/6)  is  an  int  test
167       option with unit mm and using an array with a range constraint.   Mini‐
168       mum is 4, maximum 192, and quant is 2.
169
170       Option  int-constraint-array-constraint-word-list  (6/6) is an int test
171       option with unit percent and using an array a word list constraint.
172
173

FIXED TEST OPTIONS

175       There are 3 fixed test options in total.
176
177       Option fixed (1/3) is a fixed test option with  no  unit  and  no  con‐
178       straint set.
179
180       Option  fixed-constraint-range  (2/3)  is a fixed test option with unit
181       microsecond and  constraint  range  set.  Minimum  is  -42.17,  maximum
182       32767.9999, and quant is 2.0.
183
184       Option  fixed-constraint-word-list (3/3) is a Fixed test option with no
185       unit and constraint word list set.
186

STRING TEST OPTIONS

188       There are 3 string test options in total.
189
190       Option string (1/3) is a string test option without constraint.
191
192       Option string-constraint-string-list (2/3) is a string test option with
193       string list constraint.
194
195       Option string-constraint-long-string-list (3/3) is a string test option
196       with string list constraint. Contains some more entries...
197

BUTTON TEST OPTION

199       Option button (1/1) is a Button test option. Prints some text...
200

FILES

202       /etc/sane.d/test.conf
203              The  backend  configuration  file  (see  also   description   of
204              SANE_CONFIG_DIR  below). The initial values of most of the basic
205              SANE options can be configured in this file. A template contain‐
206              ing  all the default values is provided together with this back‐
207              end.  One  of  the  more  interesting   values   may   be   num‐
208              ber_of_devices.   It can be used to check the frontend's ability
209              to show a long list of devices.  The  config  values  concerning
210              resolution  and  geometry  can be useful to test the handling of
211              big file sizes.
212
213
214       /usr/lib64/sane/libsane-test.a
215              The static library implementing this backend.
216
217       /usr/lib64/sane/libsane-test.so
218              The shared library implementing this backend (present on systems
219              that support dynamic loading).
220
221

ENVIRONMENT

223       SANE_CONFIG_DIR
224              This environment variable specifies the list of directories that
225              may contain the configuration file.  Under UNIX, the directories
226              are  separated  by a colon (`:'), under OS/2, they are separated
227              by a semi-colon (`;').  If this variable is not set, the config‐
228              uration  file is searched in two default directories: first, the
229              current working directory (".") and then in /etc/sane.d.  If the
230              value  of the environment variable ends with the directory sepa‐
231              rator character, then the default directories are searched after
232              the  explicitly  specified  directories.   For  example, setting
233              SANE_CONFIG_DIR to "/tmp/config:" would  result  in  directories
234              tmp/config, ., and /etc/sane.d being searched (in this order).
235
236       SANE_DEBUG_TEST
237              If  the  library  was  compiled with debug support enabled, this
238              environment variable controls the debug level for this  backend.
239              Higher debug levels increase the verbosity of the output.
240
241              Example: export SANE_DEBUG_TEST=4
242
243

SEE ALSO

245       sane(7), scanimage(1), xscanimage(1)
246       http://www.meier-geinitz.de/sane/test-backend/
247
248
249

AUTHOR

251       Henning Meier-Geinitz <henning@meier-geinitz.de>
252
253

BUGS

255       - config file values aren't tested for correctness
256
257
258
259                                  14 Jul 2008                     sane-test(5)
Impressum