[sane-devel] test backend & SANE_INFO_INEXACT

Ralph Little skelband at gmail.com
Wed Jun 9 20:33:11 BST 2021


Hi Jeff,

On Wed, Jun 9, 2021 at 10:04 AM Jeff <jffry at posteo.net> wrote:

> There is a gscan2pdf user with a Fujitsu scanner who has found a bug in
> gscan2pdf:
>
> https://sourceforge.net/p/gscan2pdf/mailman/message/37297482/
>
> I'm guessing it is a corner case to do with the scanner setting
> SANE_INFO_INEXACT when the user sets most geometry options.
>
> I am having trouble reproducing the problem locally because I don't have
> a similar scanner, and my HP doesn't set SANE_INFO_INEXACT.
>
> The test backend has an option "read-return-value", allowing frontend
> developers to test statuses, but I can't find a similar option for info
> values.
>
> Is there some other way of testing info values in frontends?
>
> If not, is there a maintainer for the test backend?
>
> If so, would you be able to add such an option?
>
> If not, would you be open to a patch to add such an option?
>
> Regards
>
> Jeff
>

I have added a new test option to the test backend called int-inexact.
There is a Merge Request here:

https://gitlab.com/sane-project/backends/-/merge_requests/633

Feel free to compile it and give it a try.

Example usage:

scanimage -A -d test:0 --enable-test-options=yes --int-inexact=16

The option takes any value that you specify, increments it and sets the
SANE_INFO_INEXACT flag.
The output in this case from scanimage now shows this:

scanimage: rounded value of int-inexact from 16 to 17

and

    --int-inexact <int> [17] [advanced]
        (6/6) Int test option that modifies the value and returns
        SANE_INFO_INEXACT.

I just noticed that there are some ordering issues in the existing backend
which I will fix. There are actually 7 int options, but they appear to be
spread out weirdly.

If it looks good to you, I will merge it and then it should appear in the
PPA probably about a day later.

Cheers,
Ralph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20210609/bc89c1b4/attachment.htm>


More information about the sane-devel mailing list