[sane-devel] Behavior when sane_read() returns SANE_STATUS_EOF?

Matto Marjanovic maddog@mir.com
Tue, 25 Feb 2003 15:45:54 -0500


 >>  with SANE_STATUS_EOF?  Will/should the frontend abort the scan, or
 >>  gracefully truncate the output?  (Or fill the remaining output with
 >>  black/white?)
 >
 >Print a warning and ask the user what to do. Or let the user decide by
 >preferences.

(What do the current frontends do?)

 >> I guess another version of my question is:  If the backend cannot be
 >>  *certain* that it will deliver 'lines' lines of data, is it required
 >>  to set 'lines' to -1?  (Or, can/should it provide the optimistic
 >>  intended image size, which assumes that the paper is long enough?)
 >
 >You're speaking about a sheet-fed scanner? I'd use lines = -1 in this
 >case by default. Maybe add an option "image size" (A4, Legal,
 >automatic) and use lines = -1 for automatic and a fixed size for the
 >other settings.

Yes --- I'm on the verge of better supporting a sheet-fed Microtek (older)
 scanner.  A user can legitimately specify a fully-defined scan area
 (upper-left corner, lower-right corner), which is fine if the scan area
 actually fits on the page they stick into the slot.  If not, the backend
 has to react somehow.
I guess it just seems a little odd for the backend to always say
 'lines = -1', even if it knows exactly what the line count should/could
 be (if enough sheet is in there).

I'll play around with it, in any case...

-matt m.