<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Allan -- <br>
<br>
&nbsp;&nbsp;&nbsp; I suspected this was the case.&nbsp; The "don't assume anything" mantra
is beginning to sink in.&nbsp; My concern was how to populate controls with
the appropriate values retrieved from the constraints -- but I see that
it's actually not that hard.&nbsp; It should be a matter of creating a class
that has methods to create one kind of control if the constraints are
in a range and another if it's a list, with variations for different
kinds of lists.&nbsp; Save a lot of coding if I design it well.<br>
<br>
&nbsp;&nbsp;&nbsp; Another quick question that just came to light -- the Canon
(plustek backend) returns the following&nbsp; SANE_CONSTRAINT_WORD_LIST from
the "depth" option:<br>
2<br>
8<br>
16<br>
-6553600<br>
6553600<br>
65536<br>
-1<br>
999<br>
1<br>
<br>
. . . as far as I know, only the values 8 and 16 are valid&nbsp; bit depths
(for this scanner) and that's what I get when I do "scanimage --help".&nbsp;
Do you know what the other values mean?<br>
<br>
Mark<br>
<br>
m. allan noah wrote:
<blockquote
 cite="mid:97246d0e0905211102m29eb88bfpa596deb03cc9cb62@mail.gmail.com"
 type="cite">
  <pre wrap="">On Thu, May 21, 2009 at 1:24 PM, Mark Pemburn <a class="moz-txt-link-rfc2396E" href="mailto:mark@pemburn.com">&lt;mark@pemburn.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi All,

&nbsp; The marvels of the SANE standard are starting to become clearer to me and
I'm making good progress in getting and setting the various device options
in my OS X interface project. &nbsp;However, since I have only the one Canon
N670U scanner to play with (at the moment, anyhow -- I'm borrowing a Fujitsu
fi5110c from a client), I have no way to compare how options are treated
from one device to another. &nbsp;Should I be able to assume that say, the
"resolution" option will _always_ have a constraint type of
SANE_CONSTRAINT_RANGE with a "min", "max" and a "quant" showing the steps
between or that "mode" will consistently provide a string list of supported
modes? &nbsp;If not, are there any guidelines that would help the interface
programmer work around such things?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The only 'standard' options are the 'well-known' options listed in the
sane spec, and that is sometimes just the names. But, a backend is
free to exclude those options, or implement them in a different way.

For instance, the fujitsu backend shows the resolution as
SANE_CONSTRAINT_RANGE when your machine supports it, but for older
machines, you will get a SANE_CONSTRAINT_WORD_LIST, since they only
support a few fixed resolutions. So, dont assume anything :)

The reason that the options are so descriptive is exactly so that you
WONT have to code things specific to that option. That said- there is
still some room for improvement/consistency.

allan
  </pre>
</blockquote>
<br>
</body>
</html>