umax scan resolution

Oliver.Rauch@Wolfsburg.DE
Thu, 4 Sep 1997 20:19:23 +0200 (MET DST)

Hello Umax-scanner owners!

In the moment the umax-sane-backend only supports as
maximum resolution the value "optical resolution" that is
set by the scanner and in some cases is only the half
of the resolution the firmware of the scanner supports.

The scan-width is given as a value related to a resolution
of 1200 dpi. It is calculated:

phys_width = width_in_pixels * 1200 / resolution;

that works fine from 1 to 600 dpi.

If I use more than 600 dpi, the scanner calculates
another length in pixels as I used for calculation,
so the scanned image is "crunched". If there is a
difference, then the scanner calculated one pixel less
than I expect.

So I tried different ways to change the calculation,
the first is:

phys_width = ( width_in_pixels + 0.5) * 1200 / resolution;

and the second:

phys_width = width_in_pixels * 1200 / resolution + 0.5

(tried with double and integer and ...)

but that doesn't make the thing better. Then sometimes
the scanner usese the right length, sometimes one pixel more
or one pixel less than I expect.

In the UMAX scsi-protocol is described, how the resolutions
are created:

O = hardware-resolution
S = selected resolution
D = O - S

n-th pixel = INT ( n *O/D ) pixel of hardware-resolution , n=0..D

that seem to be the pixels that are thrown away.

I don't have the time to find out what value
for phys_width (related to 1200 dpi) I have to set
to get width_in_pixels pixels back.

If anybody likes to use the resolutions > optical_res
or > 600 dpi, say me how I do calculate it and I will
include it.

----------

30 bit support (e.g. for umax-Astra 1200S) is half done!
So I think it will be included into sane-0.64. But I don't
know if xscanimage supports more than 24 bits per pixel!

But at least 30 bit gamma correction will work!

Bye
Oliver

--
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com