Re: 16 bit images

Robert Schwebel (robert@schwebel.de)
Tue, 19 Oct 1999 09:29:54 +0200

Oliver Rauch wrote:
> xsane should work with color and grayscale images with 16 bits/pixel.

Nope! From xsane-0.39/frontend/xsane-preview.c, function
preview_read_image_data:

----------8<----------8<----------8<----------8<----------
case SANE_FRAME_GRAY:
switch (p->params.depth)
{
case 1:
[...]
case 8:
[...]
default:
goto bad_depth;
----------8<----------8<----------8<----------8<----------

I tried to add a case 16, but as I don't exactly understand what's going
on here it does not really work. The frontend aquires an image and
displays it, but there seems to be a problem with byte order or
interpretation of pixel "short"s, as every second row becomes black.
Would you mind having a closer look at this?

Thanks in advance,
Robert

-- 
 +----------------------------------------------------------+
  Robert Schwebel, Luedemannstrasse 25, 24114 Kiel, Germany 
    Public Observatory Rothwesten  (near Kassel, Germany)   
      Phone: +49-431-6794138, email: robert@schwebel.de

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com