Re: SANE frames

Nick Lamb (njl98r@ecs.soton.ac.uk)
Tue, 17 Aug 1999 18:52:54 +0100 (GMT)

On Tue, 17 Aug 1999, Oliver Rauch wrote:

> I think we need to specify the code flow for multiple images that are
> acquired with one scan and a code flow for multi page scan (adf).

We could accomplish this with:
An additional "last_image" boolean, together with "last_frame" from the
existing standard. The last_frame would indicate the last frame of a
given image, and last_image would be set when this was also the last
frame of all for the whole page.

Then the following code flow eats all the images on a single page. You
can repeat this process for any following pages.

do {
do {

sane_start(...) the new frame
sane_get_parameters(...) for last_frame, last_image etc.
/* Read the whole FRAME */

} while (!last_frame);
} while (!last_image);

For a simple desktop scanner, you'll never go around the outer loop more
than once, because they only support one image for one page, AFAIK
Most modern scanners never go around the inner loop more than once
either, because they don't do multi-pass scans.

This doesn't hurt compatability too badly I hope, and it means you can
have any combination of multiple pages, images-per-page and frames
per image.

> I hope the exisiting backends are able to handle this!

Wouldn't be the first time we've had to fix a few backends, but I
doubt most scanners support ADF or multi-image scans anyway :)

Nick.

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com