kopia lustrzana https://gitlab.com/sane-project/website
146 wiersze
6.4 KiB
HTML
146 wiersze
6.4 KiB
HTML
<!-- received="Wed Mar 24 23:03:18 1999 PST" -->
|
||
<!-- sent="Wed, 24 Mar 1999 23:17:11 +0100" -->
|
||
<!-- name="Henning Meier-Geinitz" -->
|
||
<!-- email="hmg-ml@gmx.de" -->
|
||
<!-- subject="Re: Scanner survey results" -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="199903232224.OAA31417@panda.mostang.com" -->
|
||
<title>sane-devel: Re: Scanner survey results</title>
|
||
<h1>Re: Scanner survey results</h1>
|
||
<b>Henning Meier-Geinitz</b> (<a href="mailto:hmg-ml@gmx.de"><i>hmg-ml@gmx.de</i></a>)<br>
|
||
<i>Wed, 24 Mar 1999 23:17:11 +0100</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#227">[ date ]</a><a href="index.html#227">[ thread ]</a><a href="subject.html#227">[ subject ]</a><a href="author.html#227">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0228.html">Hugo van der Kooij: "Re: driver dev advice"</a>
|
||
<li> <b>Previous message:</b> <a href="0226.html">Henning Meier-Geinitz: "Re: xsane-0.18 available"</a>
|
||
<li> <b>In reply to:</b> <a href="0223.html">Johan Bengtsson: "Re: Scanner survey results"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
[mustek 600 II N ver. 1.01]<br>
|
||
<i>> Yes, unfortunately I have one with firmware 1.01, and I have </i><br>
|
||
<i>> problems with color scanning. Currently I have Sane-pre1.01-2 on </i><br>
|
||
<i>> my system. What options should one set in mustek.conf to get the </i><br>
|
||
<i>> best possible results with this scanner?</i><br>
|
||
<p>
|
||
Possibly a patch I posted some months ago can help a bit. It's against<br>
|
||
an older version of sane but I think it will work with your version,<br>
|
||
too. Perhaps you have to tweak it a bit.<br>
|
||
<p>
|
||
Something like patch -p1 <patch.file in the sane directory should do<br>
|
||
it.<br>
|
||
<p>
|
||
Here is the old article describing the problem:<br>
|
||
<p>
|
||
------------------------ snip ---------------------------------------<br>
|
||
From: Henning Meier-Geinitz <<a href="mailto:henningmg@gmx.de">henningmg@gmx.de</a>><br>
|
||
To: <a href="mailto:sane-devel@mostang.com">sane-devel@mostang.com</a><br>
|
||
Subject: line-distance correction and mustek 600 II N<br>
|
||
Sender: <a href="mailto:owner-sane-devel@mostang.com">owner-sane-devel@mostang.com</a><br>
|
||
<p>
|
||
I looked into the line-distance correction code for the mustek 600 II<br>
|
||
N in mustek.c. Some details are explained in an earlier article. With<br>
|
||
the patch color works somewhat, but there are missing lines at the<br>
|
||
end. The problem is: The scanner sends data one line after the other<br>
|
||
in the following manner (Example):<br>
|
||
<p>
|
||
R-R-R-R-B-B-R-B-G-R-B-G ... R-G-B-R-G-B<br>
|
||
<p>
|
||
If n is the distance between two CCD lines, sane loses 3*n data lines<br>
|
||
at the end of the scan. The line-distance code in sane asumes the<br>
|
||
following:<br>
|
||
<p>
|
||
R-R-R-R-B-B-R-B-G-R-B-G ... R-G-B-G-B-G-B-G-G-G<br>
|
||
<p>
|
||
If I understood correctly, mustek.c would have to scan n more lines<br>
|
||
then specified to get the full sized image. I don't know most<br>
|
||
internals of mustek.c so I can't do this.<br>
|
||
<p>
|
||
By the way: My 600 II N doesn't need the line-distance-fix, the<br>
|
||
line-distance values which it sends are correct. I don't know, if this<br>
|
||
applies for all 600 II N.<br>
|
||
<p>
|
||
The following patch corrects the color scanning problem with the 600<br>
|
||
II N as far as I can do it. It will (hopefully) fix the problem with<br>
|
||
not ignoring empty lines in mustek.conf. And I put a usleep in<br>
|
||
sanei_ab306.c. This will allow to run sane without turning on<br>
|
||
debugging (which was the only way to get sane with the 600 II N to<br>
|
||
work for me). I don't know, why it works, but it does.<br>
|
||
<br>
|
||
<p>
|
||
---------------------------- snip ----------------------------------<br>
|
||
<p>
|
||
... and here is the patch (only the color correction, the rest should<br>
|
||
have been included in sane):<br>
|
||
<p>
|
||
---------------------------- snip ----------------------------------<br>
|
||
diff -ru sane-0.72.orig/backend/mustek.c sane-0.72/backend/mustek.c<br>
|
||
--- sane-0.72.orig/backend/mustek.c Tue Mar 3 04:02:43 1998<br>
|
||
+++ sane-0.72/backend/mustek.c Mon Apr 13 21:25:53 1998<br>
|
||
@@ -1394,7 +1394,7 @@<br>
|
||
}<br>
|
||
}<br>
|
||
<br>
|
||
- num_saved_lines = s->ld.index[0] - s->ld.index[2];<br>
|
||
+ num_saved_lines = s->ld.index[0] - s->ld.index[1];<br>
|
||
if (num_saved_lines > 0)<br>
|
||
/* restore the previously saved lines: */<br>
|
||
memcpy (out, s->ld.buf[0], num_saved_lines * bpl);<br>
|
||
@@ -1404,10 +1404,10 @@<br>
|
||
if (++s->ld.lmod3 >= 3)<br>
|
||
s->ld.lmod3 = 0;<br>
|
||
<br>
|
||
- c = color_seq[s->ld.lmod3];<br>
|
||
+ c = s->ld.lmod3;<br>
|
||
if (s->ld.index[c] < 0)<br>
|
||
++s->ld.index[c];<br>
|
||
- else if (s->ld.index[c] < s->params.lines)<br>
|
||
+ else /*if (s->ld.index[c] < s->params.lines)*/<br>
|
||
{<br>
|
||
s->ld.c[c].Qk += s->ld.peak_res;<br>
|
||
if (s->ld.c[c].Qk > s->ld.max_value)<br>
|
||
@@ -1421,17 +1421,17 @@<br>
|
||
DBG (1, "fix_line_distance_pp: lmod3=%d, index=(%d,%d,%d)\n",<br>
|
||
s->ld.lmod3,<br>
|
||
s->ld.index[0], s->ld.index[1], s->ld.index[2]);<br>
|
||
- num_lines = s->ld.index[2] - s->ld.ld_line;<br>
|
||
+ num_lines = s->ld.index[1] - s->ld.ld_line;<br>
|
||
<br>
|
||
/* copy away the lines with at least one missing<br>
|
||
color component, so that we can interleave them<br>
|
||
with new scan data on the next call */<br>
|
||
- num_saved_lines = s->ld.index[0] - s->ld.index[2];<br>
|
||
+ num_saved_lines = s->ld.index[0] - s->ld.index[1];<br>
|
||
memcpy (s->ld.buf[0], out + num_lines * bpl,<br>
|
||
num_saved_lines * bpl);<br>
|
||
<br>
|
||
/* notice the number of lines we processed */<br>
|
||
- s->ld.ld_line = s->ld.index[2];<br>
|
||
+ s->ld.ld_line = s->ld.index[1];<br>
|
||
/* return number of complete (r+g+b) lines */<br>
|
||
return num_lines;<br>
|
||
}<br>
|
||
---------------------------- snip ----------------------------------<br>
|
||
<p>
|
||
<p>
|
||
hth, Henning<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="0228.html">Hugo van der Kooij: "Re: driver dev advice"</a>
|
||
<li> <b>Previous message:</b> <a href="0226.html">Henning Meier-Geinitz: "Re: xsane-0.18 available"</a>
|
||
<li> <b>In reply to:</b> <a href="0223.html">Johan Bengtsson: "Re: Scanner survey results"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|