[sane-devel] Fwd: Re: How implement multi page scan

Olaf Meeuwissen olaf.meeuwissen at avasys.jp
Thu May 7 23:09:50 UTC 2015


The mailing list software didn't quite like the way my mailer handled
the kanji for sunjing's name in the headers, so I'm resending this.
Sorry if you get multiple copies.

Olaf Meeuwissen writes:

> <sunjing at newbeiyang.com> writes:
>
>> Hello everyone:
>>    I want to scan multipage document by using sane driver.
>>    What is the code flow? 
>>    I read the sane .standard 1.05,the code flow describled as below
>>
>>      Sane_start()
>>             Sane_get_parameters()
>>             Sane_read()
>>       Sane_cancel()
>>     
>>      I want to know if I scan multipage document, I have to call
>> sane_start()  at each page.
>
> Yes.  It may not be very clear from the diagram but the second to last
> paragraph of section 4.4 Code Flow is pretty clear.
>
>   [...]  If the frontend expects additional frames (e.g., the individual
>   channels of a red/green/blue image or *multiple images*), it can call
>   sane_start() again.  Once all desired frames have been acquired,
>   function sane_cancel() must be called.  [...]
>
> Note that you call sane_start() multiple times but sane_cancel() only
> once.
>
> Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962



More information about the sane-devel mailing list