[sane-devel] scanimage bug?

Major A andras@users.sourceforge.net
Sat, 27 Apr 2002 18:27:37 +0100


Henning,

> I just tried with a slightly modified test backend with SANE_TYPE_INT
> and the range looks ok. Are you sure that this is not related to the 
> "range->max = s->boundaryx - 1;" you use when initializing the
> ranges? Can you add a DBG in sane_control_option that prints range.max
> for the option that's currently read? Together with the output of
> scanimage it should be possible to find the source of the problem.

I'm quite sure the "-1" is correct. If I have a scanner that has, say,
1000 pixels in one direction, I can specify 0...999 for both the left
and right boundaries, but the width ranges from 1 to 1000. At least
that's how scanimage works: if I specify a left of 0 and a width of
999 (the maximum given by scanimage -h), it passes a left of 0 and a
right of 998 to the scanner.

  Andras

===========================================================================
Major Andras
    e-mail: andras@users.sourceforge.net
    www:    http://andras.webhop.org/
===========================================================================