sane-project-website/old-archive/1999-05/0074.html

80 wiersze
4.1 KiB
HTML

<!-- received="Mon May 10 08:45:59 1999 PDT" -->
<!-- sent="Mon, 10 May 1999 08:44:41 -0700" -->
<!-- name="Brian Macy" -->
<!-- email="bmacy@sunshinecomputing.com" -->
<!-- subject="Re: [Announce] WinSANE 0.1.0.0 Release" -->
<!-- id="" -->
<!-- inreplyto="[Announce] WinSANE 0.1.0.0 Release" -->
<title>sane-devel: Re: [Announce] WinSANE 0.1.0.0 Release</title>
<h1>Re: [Announce] WinSANE 0.1.0.0 Release</h1>
<b>Brian Macy</b> (<a href="mailto:bmacy@sunshinecomputing.com"><i>bmacy@sunshinecomputing.com</i></a>)<br>
<i>Mon, 10 May 1999 08:44:41 -0700</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#74">[ date ]</a><a href="index.html#74">[ thread ]</a><a href="subject.html#74">[ subject ]</a><a href="author.html#74">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0075.html">Rick Macdonald: "Low versus medium priced scanners"</a>
<li> <b>Previous message:</b> <a href="0073.html">Nick Lamb: "Re: [Announce] WinSANE 0.1.0.0 Release"</a>
<li> <b>Maybe in reply to:</b> <a href="0070.html">Brian Macy: "[Announce] WinSANE 0.1.0.0 Release"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0091.html">Brian Macy: "Re: [Announce] WinSANE 0.1.0.0 Release"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt; No. "packed" modes are violently unpleasant, and while some scanners might</i><br>
<i>&gt; use them to buy some compression, SANE doesn't support any such a format.</i><br>
<i>&gt;</i><br>
<i>&gt; A series of three 10-bit samples (e.g. an RGB pixel captured by a one-pass</i><br>
<i>&gt; 30-bit parallel port scanner) will arive through SANE as...</i><br>
<i>&gt;</i><br>
<i>&gt; 98765432 10------ 98765432 10------ 98765432 10------</i><br>
<i>&gt; Or, alternatively (ENDIAN dependence kicks in here)</i><br>
<i>&gt; 10------ 98765432 10------ 98765432 10------ 98765432</i><br>
<i>&gt;</i><br>
<i>&gt; The ---- sequences will usually be either zero, or copied from the top</i><br>
bits<br>
<i>&gt; of the 10-bit sample (explanation a few weeks ago on this list). The</i><br>
<i>&gt; backend should tell you how many bits are "really there" in any case.</i><br>
<i>&gt; You can tell which way around the samples are from the ENDIAN stuff set</i><br>
<i>&gt; by the sender. Your job, as a recipient, is to correct anything which is</i><br>
<i>&gt; "the wrong way around" for your application/ platform.</i><br>
<i>&gt;</i><br>
<i>&gt; Note that since the _high_ bits are used, you could assume that you're</i><br>
<i>&gt; always receiving true 16-bit samples. For a simple application (like</i><br>
<i>&gt; photo retouching) this is probably fairly safe.</i><br>
<p>
Hmmm... so are you saying that anything greater than 1bit depth uses byte<br>
aligned data??? Actually the docs (3.2) say "Valid bit depths are 1, 8, or<br>
16 bits per sample. If a device's natural bit depth is something else, it is<br>
up to the driver to scale the sample values appropriately (e.g., a 4 bit<br>
sample could be scaled by a factor of four to represent a sample value of<br>
depth 8)." So if there is a bit depth of 10 the driver better scale it to<br>
16bits and the LSB format must be:<br>
98765432 xxxxxx10 (where the x's must be zero)<br>
or some value scaled to a 16bit value.<br>
<p>
Oh wait.... never mind... the 10bit value is getting left shifted 6bits to<br>
scale it up to the 16bit values.<br>
<p>
BTW thanks much for your help.<br>
<p>
Brian Macy<br>
<p>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0075.html">Rick Macdonald: "Low versus medium priced scanners"</a>
<li> <b>Previous message:</b> <a href="0073.html">Nick Lamb: "Re: [Announce] WinSANE 0.1.0.0 Release"</a>
<li> <b>Maybe in reply to:</b> <a href="0070.html">Brian Macy: "[Announce] WinSANE 0.1.0.0 Release"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0091.html">Brian Macy: "Re: [Announce] WinSANE 0.1.0.0 Release"</a>
<!-- reply="end" -->
</ul>