[sane-devel] Scanning with 16 bits color depth (2 bytes/color)

Nicolas nicolas.martin at freesurf.fr
Fri Oct 3 06:15:34 UTC 2008

Ok, thanks a lot for this clarification, I understand that 16 bits per
color images are supported by the standard, so no special scaling would
be necessary. 

But do you or someone knows if scanimage or Xsane can handle 16 bits per
color appropriately ?


Le vendredi 03 octobre 2008 à 08:20 +0900, Olaf Meeuwissen a écrit :
> Nicolas <nicolas.martin at freesurf.fr> writes:
> > So my question is: I know Sane standard defines image format to be RGB,
> > 8 bits/color.
> Not completely correct.  See below.
> > But is it possible to request a Sane frontend to get a 16 bits/color
> > image format and deal with that, or do I have to transform this 48 bits
> > image format into 24 bits in the backend, before returning the image
> > data to the frontend ?
> >From the SANE 1.0 API specification, section 3.2:
>   A SANE image is a rectangular area. The rectangular area is
>   subdivided into a number of rows and columns. At the intersection of
>   each row and column is a quadratic pixel. A pixel consists of one or
>   more sample values. Each sample value represents one channel (e.g.,
>   the red channel). Each sample value has a certain bit depth. The bit
>   depth is fixed for the entire image and can be as small as one
>   bit. Valid bit depths are 1, 8, or 16 bits per sample. If a device's
>   natural bit depth is something else, it is up to the driver to scale
>   the sample values appropriately (e.g., a 4 bit sample could be
>   scaled by a factor of four to represent a sample value of depth 8).
> So the answer is yes.
> Hope this helps,

More information about the sane-devel mailing list