[sane-devel] SANE2 standard revisited: Well-Known Options

Henning Meier-Geinitz henning@meier-geinitz.de
Fri, 6 Dec 2002 21:45:53 +0100


On Thu, Dec 05, 2002 at 06:09:57PM +0100, Henning Meier-Geinitz wrote:
> http://www.meier-geinitz.de/sane/sane2/

|4.5.2 Scan Resolution Options

| Option resolution is used to select the resolution at which an image
| should be acquired. When the backend wants to allow different values
| for x- and y-resolution it has to define the options x_resolution and
| y_resolution. Note that only the option resolution or the options
| x_resolution and y_resolution may be active. 

"... may be active at the same time" to make it more clear.

The option names are "x-resolution" and "y-resolution", aren't they?
The underscore is not allowed in the name.

| 4.5.4 Scan Area Options

Shouldn't we add the usual standard-disclaimer: "This option is not
mandatory, but if a backend does support it, it must implement it in a
manner consistent with the above definition. "?

|4.5.6 Gamma table options

| The backend should not use the gamma tables to emulate other functions
| or options like highlight, shadow, contrast, brightness, threshold,
| analog_gamma.

But doing a gamma table in software is allowed?

I would move the Gamma table options to the Thershold, Annalog Gamma,
Shadow and Highlight options, that's where it fits better than between
depth and scan mode.

| 4.5.9 Threshold

| The option threshold is used to define the threshold for Lineart and
| maybe Halftone mode. In multi bit modes this option should be set
| inactive. The type of this option is SANE_TYPE_FIXED. The unit is
| SANE_UNIT_PERCENT. The value range should be 0.0...100.0 if possible.
| It defines the minimum intensity to get a white point / full intensity
| (image data bit = 0).

The bit is only 0 in RAW mode for gray frames. For color frames (the
funny 1 bit color mode) it's one. And it may be anything for MIME
types. So i would just remove "(image data bit = 0)", white point/full
intensity is clear enough. Same for the rest of the text.

I'll write about scan buttons in a separate email because that will
become more complex, I guess.

New Well Known Options:
 set focus position FOCUS_POS_X, FOCUS_POS_Y
As I don't know what's the idea of that one, the proponent should
explain :-)

(From Oliver Rauch, the text is from me):
"4.5.15 Batch scan options 

The batch scan options can be used by a frontend to indicate that more
than one image will be scanned in a batch. The backend provides the
options batch-scan-start, batch-scan-loop, batch-scan-end,
batch-scan-next-tl-x, batch-scan-next-tl-y, batch-scan-next-br-x, and
batch-scan-next-br-y. The first three options are of type
SANE_TYPE_BOOL and indicate that the next scan is the first scan, the
second or following or the last scan of a batch respectively. The
batch-scan-next options specify the coordinates of the next scan and
follow the same rules as the scan area option (see section ...).

These options are not mandatory, but if a backend does support them,
it must implement them in a manner consistent with the above definition.
In this case, all options must be implemented."

Some points of discussion:

- Are all four geometry options necessary? If a device scans from
  top-to-bottom, tl-y would be sufficiant. However, there may exist
  device with a different scanning direction and the standard say,
  it's the job of the backend to transform coordinates. So we can't
  just redefine the top-left edge to something else. Do such devices

- Instead of three bool options, one sring-list option would be
  possible. This would avoid the case of more than one  option is set
  by a misdirected frontend. On the other hand, these options should
  be handeld by the frontend, not the user so bool is easier to handle.