sane-project-website/old-archive/1998-03/0218.html

78 wiersze
3.9 KiB
HTML

<!-- received="Tue Mar 31 07:54:40 1998 PST" -->
<!-- sent="Tue, 31 Mar 1998 10:54:47 -0500 (EST)" -->
<!-- name="Chris Pinkham" -->
<!-- email="cpinkham@billing.infi.net" -->
<!-- subject="Re: Artec AT3 and A6000C Plus driver" -->
<!-- id="9803311554.AA19425@mulder.looney.infi.net" -->
<!-- inreplyto="199803310606.IAA00647@cave.BitWizard.nl" -->
<title>sane-devel: Re: Artec AT3 and A6000C Plus driver</title>
<h1>Re: Artec AT3 and A6000C Plus driver</h1>
<b>Chris Pinkham</b> (<a href="mailto:cpinkham@billing.infi.net"><i>cpinkham@billing.infi.net</i></a>)<br>
<i>Tue, 31 Mar 1998 10:54:47 -0500 (EST)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#218">[ date ]</a><a href="index.html#218">[ thread ]</a><a href="subject.html#218">[ subject ]</a><a href="author.html#218">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0219.html">Gordon Matzigkeit: "Patch to 0.71 spec file"</a>
<li> <b>Previous message:</b> <a href="0217.html">Hugo van der Kooij: "Re: xscanimage SIGSEGV in gtk_real_window_move_resize"</a>
<li> <b>In reply to:</b> <a href="0213.html">Rogier Wolff: "Re: Artec AT3 and A6000C Plus driver"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Rogier Wolff wrote:<br>
<i>&gt; Chris Pinkham wrote:</i><br>
<i>&gt; &gt; week or so. I have the driver working for greyscale and am finishing up</i><br>
<i>&gt; &gt; correcting a RGB-mode line-offset problem similar to the Microtek. </i><br>
<br>
<i>&gt; Would it be a good idea to make a sort of "library" that can solve the</i><br>
<i>&gt; line-offset problems, given a few parameters passed by the backend?</i><br>
<p>
I was going to break the code to correct this out into it's own function<br>
anyway, maybe this could be done later. I haven't looked at the Microtek<br>
code that closely, but I see that it also has code to convert a line of<br>
the form 'RRRRGGGGBBBB' into 'RGBRGBRGBRGB', so it might be good to move<br>
that out into this 'library' also sometime. From the docs that I have<br>
for the Ultima/Artec, it looks like it always needs this conversion done<br>
in RGB mode.<br>
<p>
Since I haven't looked at the Microtek code too closely, I am not sure<br>
how similar the line-offset problem is to the Ultima/Artec. Here is a<br>
quick description of the way my scanner works.<br>
<p>
There is a different line offset for each resolution supported. This<br>
offset is obtained by: offset = 8 * ( vertical_resolution / 300 ).<br>
For 300 dpi, the offset is 8, so R0 goes with G8 and B16, R1 ~ G9 ~ B17,<br>
etc. I work around this by getting a buffer to hold the first<br>
(offset * 2) lines of Red, and another to hold the first (offset) lines<br>
of Green. The actual scan window has to be set to the desired size +<br>
(offset * 2) because we throw away (offset) lines at the beginning<br>
and end of the scan. I'm going to make a function where I pass it a<br>
block of data and it fills in a buffer and size variable if there is<br>
enough data to fill a row yet. I can then do the RRGGBB =&gt; RGBRGB fixup<br>
either inside or after this function.<br>
<p>
Chris<br>
<p>
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\<br>
<i>| Chris Pinkham |</i><br>
<i>| <a href="mailto:cpinkham@sh001.infi.net">cpinkham@sh001.infi.net</a> |</i><br>
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<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="0219.html">Gordon Matzigkeit: "Patch to 0.71 spec file"</a>
<li> <b>Previous message:</b> <a href="0217.html">Hugo van der Kooij: "Re: xscanimage SIGSEGV in gtk_real_window_move_resize"</a>
<li> <b>In reply to:</b> <a href="0213.html">Rogier Wolff: "Re: Artec AT3 and A6000C Plus driver"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>