sane-project-website/old-archive/1998-01/0236.html

72 wiersze
3.3 KiB
HTML

<!-- received="Wed Jan 28 21:24:07 1998 PST" -->
<!-- sent="Wed, 28 Jan 1998 21:24:06 -0800" -->
<!-- name="David Mosberger-Tang" -->
<!-- email="David.Mosberger@acm.org" -->
<!-- subject="Re: AppleScanner(s) Support" -->
<!-- id="199801290524.VAA08895@panda.mostang.com" -->
<!-- inreplyto="9801281527.AA25060@isosun.ariadne-t.gr" -->
<title>sane-devel: Re: AppleScanner(s) Support</title>
<h1>Re: AppleScanner(s) Support</h1>
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
<i>Wed, 28 Jan 1998 21:24:06 -0800</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#236">[ date ]</a><a href="index.html#236">[ thread ]</a><a href="subject.html#236">[ subject ]</a><a href="author.html#236">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0237.html">David Mosberger-Tang: "Re: SANE works on SPARCLinux!"</a>
<li> <b>Previous message:</b> <a href="0235.html">Matto Marjanovic: "What a backlog... (microtek)"</a>
<li> <b>In reply to:</b> <a href="0227.html">Milon Firikis: "AppleScanner(s) Support"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt;&gt;&gt;&gt;&gt; On Wed, 28 Jan 98 17:27:18 EET, Milon Firikis &lt;<a href="mailto:milonf@isosun.ariadne-t.gr">milonf@isosun.ariadne-t.gr</a>&gt; said:</i><br>
<p>
Milon&gt; What I want to announce is The "Apple Scanner(s) pre Alpha"<br>
Milon&gt; support patch! A premature version of the backend is allmost<br>
Milon&gt; ready:<br>
<p>
Milon&gt; I will post it on this list about Monday...<br>
<p>
Cool. May I ask what OS you're doing this on? MkLinux?<br>
<p>
Milon&gt; Question: AppleScanner has a gray16 mode. I am capable of<br>
Milon&gt; scanning in binary modes (1bit) but I am having some problems<br>
Milon&gt; with this (4bit) mode. scanimage segfaults? What should I<br>
Milon&gt; do? I could built an internal buffer so that backend would<br>
Milon&gt; report 8bit depth to the frontends. Is this the right thing<br>
Milon&gt; to do? or should the frontends be aware for such "weird"<br>
Milon&gt; formats?<br>
<p>
Yes, the SANE API restricts bit depths to be a multiple of 8 bits<br>
(with the notable exception of 1 bit depth). So you'd have to expand<br>
&amp; scale the 4 bit nibbles into 8 bit bytes. If Andy is reading this<br>
mail, he'll be sure to point out that you should do the scaling with<br>
something like this:<br>
<p>
byte = (nibble &lt;&lt; 4) | nibble;<br>
<p>
This makes sure the smallest intensity maps into 0x00 and the largest<br>
intensity maps to 0xff (i.e., there is no "compression" in the output<br>
range).<br>
<p>
Right, Andy? ;-)<br>
<p>
--david<br>
<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="0237.html">David Mosberger-Tang: "Re: SANE works on SPARCLinux!"</a>
<li> <b>Previous message:</b> <a href="0235.html">Matto Marjanovic: "What a backlog... (microtek)"</a>
<li> <b>In reply to:</b> <a href="0227.html">Milon Firikis: "AppleScanner(s) Support"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>