[sane-devel] Intra-frame parameters

Ralph Little skelband at gmail.com
Wed Aug 19 17:35:06 BST 2026


Hi Devs,
A developer has raised an interesting question, and I thought I would 
seek views on it.

The SANE API spec mentions that sane_get_parameters() may be called 
before sane_start() to get an estimate of the scan parameters, and this 
is firmed up after sane_start() is called.
However, in the case of multi-frame images, the sequence is:

- sane_get_parameters() returns an estimate.
- sane_start() is called and now sane_parameters() returns "firmed up" 
values.
- sane_read() eventually returns EOF at the end of the first frame 
(SANE_FRAME_RED).

At this point, if the client calls sane_get_parameters(), should the 
parameters of the first frame still be returned or should we now be 
getting an "estimate" of the parameters of frame two?
Certainly, after sane_start() is called a second time for frame two, we 
should be getting frame two's parameters.

The SANE API spec doesn't explicitly deal with this and I believe this 
to be a grey area.

Cheers,
Ralph



More information about the sane-devel mailing list