[sane-devel] Thanks!
Mattias Ellert
mattias.ellert at tsl.uu.se
Mon Mar 27 14:34:41 UTC 2006
On Mon, 2006-03-27 at 15:37 +0200, Felix Rubio Dalmau wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
> Thank you very much :-) I've found my error. The units in which sane
> gives me the range of X and Y (top-X, top-Y, bottom-X and bottom-Y)
> are not in millimeters, as is told by the scanner. Does anyone know
> the reason for this? I've discovered that X ranges from to 14.000.000
> aprox, and it's trivial to see that it can't be millimeters (can you
> imagine it? :-S wooo). How could I discover the real units of that
> measure?
>
> Thanks!
It is millimetres, but the data type is not integer, but fixed.
The option descriptor you get with sane_get_option_descriptor contains
the fields type and unit. In this case the type is SANE_TYPE_FIXED and
the unit is SANE_UNIT_MM. You have to check the option descriptor to
know how to interpret the values. Different backends can use different
types for the same option.
You can use the SANE_FIX and SANE_UNFIX macros to convert between double
and fixed values.
Mattias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2260 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20060327/91982386/smime.bin
More information about the sane-devel
mailing list