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

77 wiersze
3.6 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Mon May 10 07:51:30 1999 PDT" -->
<!-- sent="Mon, 10 May 1999 15:50:24 +0100 (GMT)" -->
<!-- name="Nick Lamb" -->
<!-- email="njl98r@ecs.soton.ac.uk" -->
<!-- subject="Re: [Announce] WinSANE 0.1.0.0 Release" -->
<!-- id="" -->
<!-- inreplyto="003101be9aed$c663aba0$499672cf@sunshinecomputing.com" -->
<title>sane-devel: Re: [Announce] WinSANE 0.1.0.0 Release</title>
<h1>Re: [Announce] WinSANE 0.1.0.0 Release</h1>
<b>Nick Lamb</b> (<a href="mailto:njl98r@ecs.soton.ac.uk"><i>njl98r@ecs.soton.ac.uk</i></a>)<br>
<i>Mon, 10 May 1999 15:50:24 +0100 (GMT)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#73">[ date ]</a><a href="index.html#73">[ thread ]</a><a href="subject.html#73">[ subject ]</a><a href="author.html#73">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0074.html">Brian Macy: "Re: [Announce] WinSANE 0.1.0.0 Release"</a>
<li> <b>Previous message:</b> <a href="0072.html">Brian Macy: "Re: [Announce] WinSANE 0.1.0.0 Release"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
On Mon, 10 May 1999, Brian Macy wrote:<br>
<p>
<i>&gt; Thanks... you are correct it doesn't. I was looking at the code for SANE and</i><br>
<i>&gt; it didn't look like it handled &gt;8bits per color too. There were a couple of</i><br>
<i>&gt; locations in the frontends where it errored if bit depth was anything</i><br>
<i>&gt; besides 1 or 8. Oh well... hopefully people will still find use for it</i><br>
<i>&gt; without such support. I'd still like to know how in the world you would code</i><br>
<i>&gt; this to be anything besides... swapping bits is kind of strange. So are you</i><br>
<i>&gt; telling me that for MSB 10bit data you get:</i><br>
<i>&gt; 98765432 10987654 ... etc</i><br>
<i>&gt; but for LSB 10bit you get:</i><br>
<i>&gt; 76543210 98543210 98763210 ... etc.</i><br>
<i>&gt; or is it</i><br>
<i>&gt; 76543210 98765432 10987654 ... etc.</i><br>
<p>
No. "packed" modes are violently unpleasant, and while some scanners might<br>
use them to buy some compression, SANE doesn't support any such a format.<br>
<p>
A series of three 10-bit samples (e.g. an RGB pixel captured by a one-pass<br>
30-bit parallel port scanner) will arive through SANE as...<br>
<p>
98765432 10------ 98765432 10------ 98765432 10------<br>
<p>
Or, alternatively (ENDIAN dependence kicks in here)<br>
<p>
10------ 98765432 10------ 98765432 10------ 98765432<br>
<p>
The ---- sequences will usually be either zero, or copied from the top bits<br>
of the 10-bit sample (explanation a few weeks ago on this list). The<br>
backend should tell you how many bits are "really there" in any case. <br>
You can tell which way around the samples are from the ENDIAN stuff set<br>
by the sender. Your job, as a recipient, is to correct anything which is<br>
"the wrong way around" for your application/ platform.<br>
<p>
Note that since the _high_ bits are used, you could assume that you're<br>
always receiving true 16-bit samples. For a simple application (like<br>
photo retouching) this is probably fairly safe.<br>
<p>
Nick.<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="0074.html">Brian Macy: "Re: [Announce] WinSANE 0.1.0.0 Release"</a>
<li> <b>Previous message:</b> <a href="0072.html">Brian Macy: "Re: [Announce] WinSANE 0.1.0.0 Release"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>