Re: problems with snapscan and scanimage

David Mosberger-Tang (David.Mosberger@acm.org)
Mon, 11 May 1998 21:40:43 -0700

>>>>> On Mon, 11 May 1998 21:42:28 -0600 (MDT), charter@cs.ualberta.ca said:

>> (*) After a closer look I'd say it does not produce 10 bits -- it
>> just *claims* to :-)

Kevin> The output from the scanner to the host is 8 bits per
Kevin> sample, but the scanner allows the host to download a
Kevin> 10-bit gamma table for each channel. Presumably this gives
Kevin> finer control over gamma correction (or "tone curving")
Kevin> than the 8-bit tables, despite the fact that the data is
Kevin> being converted to 8 bits before it's sent to the host.

A couple of notes:

- The SANE API supports depths of 1 bit/channel or any
positive integer multiple of 8. 10 bits/channel is _not_
a supported depth.

- Most (all?) current frontends are limited to 8 bits/channel.
This isn't hard to fix, it's just no fun to do without
hardware to test it with.

- A 10-bit gamma table does indeed make sense even when the
output is only 8 bits/channel. Fortunately, this can be
supported just fine with SANE (e.g., simply allow values in
the range 0..1023 for the gamma vector elements).

I applied a patch similar to Mikko's to the SnapScan backend---hope
that's all right.

Thanks,

--david

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