sane-project-website/old-archive/1997-05/0116.html

74 wiersze
3.8 KiB
HTML

<!-- received="Wed Jun 18 15:52:50 1997 MST" -->
<!-- sent="Wed, 18 Jun 1997 15:46:19 -0700" -->
<!-- name="David Mosberger-Tang" -->
<!-- email="davidm@azstarnet.com" -->
<!-- subject="Re: QuickCam bit depth wired to 8: why?" -->
<!-- id="199706182246.PAA21642@panda.mosberger" -->
<!-- inreplyto="199706182212.SAA02540@lemur.magnet.com" -->
<title>sane-devel: Re: QuickCam bit depth wired to 8: why?</title>
<h1>Re: QuickCam bit depth wired to 8: why?</h1>
<b>David Mosberger-Tang</b> (<a href="mailto:davidm@azstarnet.com"><i>davidm@azstarnet.com</i></a>)<br>
<i>Wed, 18 Jun 1997 15:46:19 -0700</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#116">[ date ]</a><a href="index.html#116">[ thread ]</a><a href="subject.html#116">[ subject ]</a><a href="author.html#116">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0117.html">Andrew Kuchling: "Re: QuickCam bit depth wired to 8: why?"</a>
<li> <b>Previous message:</b> <a href="0115.html">Andrew Kuchling: "QuickCam bit depth wired to 8: why?"</a>
<li> <b>In reply to:</b> <a href="0115.html">Andrew Kuchling: "QuickCam bit depth wired to 8: why?"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0117.html">Andrew Kuchling: "Re: QuickCam bit depth wired to 8: why?"</a>
<li> <b>Reply:</b> <a href="0117.html">Andrew Kuchling: "Re: QuickCam bit depth wired to 8: why?"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt;&gt;&gt;&gt;&gt; On Wed, 18 Jun 1997 18:12:08 -0400 (EDT), Andrew Kuchling &lt;<a href="mailto:amk@magnet.com">amk@magnet.com</a>&gt; said:</i><br>
<p>
Andrew&gt; I was wondering why scanimage was producing such dark<br>
Andrew&gt; images, and realized that the bit depth returned from<br>
Andrew&gt; sane_get_parameters() in qcam.c is hard-wired to 8--the<br>
Andrew&gt; configured bit depth (4 or 6 bits) isn't used. Why is that<br>
Andrew&gt; done?<br>
<p>
4 and 6 bit/sample are unsupported depths (see below).<br>
<p>
Andrew&gt; scanimage.c also assumes that grey-scale images will always<br>
Andrew&gt; have a bit depth of 8; for the moment I've been simply<br>
Andrew&gt; hand-editing the generated .pnm file, changing the number of<br>
Andrew&gt; colours from 255 to 63.<br>
<p>
Argh, I think I mentioned in the SANE docs that the bit depth must be<br>
either 1, 8 or 16 bits per sample, but I just checked and found that I<br>
didn't say so explicitly. I fixed that now by adding the following to<br>
the section on the Image Data Format:<br>
<p>
\begin{changebar}<br>
Valid bit depths are 1, 8, or 16 bits per sample. If a device's<br>
natural bit depth is something else, it is up to the driver to scale<br>
the sample values appropriately (e.g., a 4 bit sample could be<br>
scaled by a factor of four to represent a sample value of depth 8).<br>
\end{changebar}<br>
<p>
So, the intent is that the qcam backend scales 4 and 6 bit samples to<br>
8 bit samples. Then everything will work as intended.<br>
<p>
--david<br>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.azstarnet.com/~axplinux/sane/">http://www.azstarnet.com/~axplinux/sane/</a>
To unsubscribe: mail -s unsubscribe <a href="mailto:sane-devel-request@listserv.azstarnet.com">sane-devel-request@listserv.azstarnet.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0117.html">Andrew Kuchling: "Re: QuickCam bit depth wired to 8: why?"</a>
<li> <b>Previous message:</b> <a href="0115.html">Andrew Kuchling: "QuickCam bit depth wired to 8: why?"</a>
<li> <b>In reply to:</b> <a href="0115.html">Andrew Kuchling: "QuickCam bit depth wired to 8: why?"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0117.html">Andrew Kuchling: "Re: QuickCam bit depth wired to 8: why?"</a>
<li> <b>Reply:</b> <a href="0117.html">Andrew Kuchling: "Re: QuickCam bit depth wired to 8: why?"</a>
<!-- reply="end" -->
</ul>