[sane-devel] image lines is -1 according to sane_get_parameters

Stef stef.dev at free.fr
Tue Oct 23 18:21:55 UTC 2012


On 23/10/2012 02:00, Olaf Meeuwissen wrote:
> m. allan noah writes:
>
>> That is the backend's indication that it does not know the length of
>> the paper. The backend should have some option where you set the
>> height of the image you want it to scan. If you do not tell it, it
>> tells you that it does not know. I imagine you use an Avision scanner?
>>
>> On Mon, Oct 22, 2012 at 7:27 PM, dabicho <tsukebumi at gmail.com> wrote:
>>> Hi.
>>> I am writing a front-end.
>>> In previous version, after sane_start, sane_get_parameters would tell
>>> me how much memory I would need to allocate for the image.
>>> I am using 1.0.22-5 (from fedora) to support a new scanner, but after
>>> sane_get_parameters I am told the image is "-1" lines high.
>>> What does that mean? I have not received any error, and xsane works alright.
>>> or how sould I go about it as a turn around?
>>>
>>> any pointer please?
> See the API specification for sane_get_parameters():
>
>    Member lines specifies how many scan lines the frame is comprised of.
>    If this value is -1, the number of lines is not known a priori and the
>    frontend should call sane_read () until it returns a status of
>    SANE_STATUS_EOF.
>
> There are situations where you want to scan the whole document but the
> device cannot determine in advance how long it is.  Think an ECG for
> example.
>
> Hope this helps,
     Hello,

     another common case is sheet-fed scanners, you cannot know the 
final scan size until you have scan all the sheet.

Regards,
     Stef



More information about the sane-devel mailing list