[sane-devel] Perl Bindings

m. allan noah kitno455 at gmail.com
Wed Dec 10 02:25:16 UTC 2008

On Thu, Nov 13, 2008 at 4:26 PM, Jeffrey Ratcliffe
<jeffrey.ratcliffe at gmail.com> wrote:
>> 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.

No, they are not floats, they are fixed. It is possible to manipulate
them without UNFIXing them. The fujitsu backend has produced these
type of warnings for years, even on simple things like
--resolution=100, and I never could figure out why, until now...

I think the problem is actually that the var 'info' is not initialized
to 0 by scanimage or the backend. Sometimes, the SANE_INFO_INEXACT bit
(0x01) is set, and scanimage mistakenly thinks that the value has been

I have a patch to fix that (and add your 'len <= max' fix) in the
queue here, but alioth seems down ATM.

If your patch fixed the issue, I wonder if it was just a fluke, that
your *info was 0 on that run?

"The truth is an offense, but not a sin"

More information about the sane-devel mailing list