[sane-devel] Perl Bindings
jeffrey.ratcliffe at gmail.com
Thu Nov 13 21:26:10 UTC 2008
> then, under the hood, scanimage converts your commands like so:
> -l 2 -x 21 = --tl_x 2 --br_x 23
> -t 1 -y 32 = --tl_y 1 --br_y 33
The relevant line is 2038:
val = pos + window_val[index] - 1;
But these aren't integers, they are floats, so I don't think the above
is correct. The
attached patch fixes the problem.
> The rounding messages are caused by something returning
> SANE_INFO_INEXACT are you checking the info in perl?
Yes. I can trigger the message by giving the Perl version a non-integer
value, and having fixed the above x/y problem, I am now getting the same
image size, and still no rounding message.
Using the attached patch for scanimage.c, I now get identical results
with the Perl version. Assuming you accept the patch, scanadf.c will
also have to be fixed, as it has identical code here.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 853 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20081113/2648f424/attachment-0001.obj
More information about the sane-devel