sane-project-website/old-archive/1999-02/0142.html

157 wiersze
6.4 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 Feb 22 00:26:09 1999 PST" -->
<!-- sent="Mon, 22 Feb 1999 08:23:23 +0000" -->
<!-- name="Heinrich Rebehn" -->
<!-- email="rebehn@comm.uni-bremen.de" -->
<!-- subject="Re: resolution option unknown" -->
<!-- id="" -->
<!-- inreplyto="resolution option unknown" -->
<title>sane-devel: Re: resolution option unknown</title>
<h1>Re: resolution option unknown</h1>
<b>Heinrich Rebehn</b> (<a href="mailto:rebehn@comm.uni-bremen.de"><i>rebehn@comm.uni-bremen.de</i></a>)<br>
<i>Mon, 22 Feb 1999 08:23:23 +0000</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#142">[ date ]</a><a href="index.html#142">[ thread ]</a><a href="subject.html#142">[ subject ]</a><a href="author.html#142">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0143.html">Dr. Andreas Bolsch: "Re: resolution option unknown"</a>
<li> <b>Previous message:</b> <a href="0141.html">Oliver Rauch: "NEW: xsane-0.12 available"</a>
<li> <b>Maybe in reply to:</b> <a href="0130.html">Rene Vellekoop: "resolution option unknown"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0143.html">Dr. Andreas Bolsch: "Re: resolution option unknown"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
This is a multi-part message in MIME format.<br>
--------------79BF5AD747BD2DD7B1AD4E54<br>
Content-Type: text/plain; charset=us-ascii<br>
Content-Transfer-Encoding: 7bit<br>
<p>
Rene Vellekoop wrote:<br>
<i>&gt; </i><br>
<i>&gt; Hi there!</i><br>
<i>&gt; </i><br>
<i>&gt; I use a Mustek 600 II N scanner. 'scanimage -L' returns:</i><br>
<i>&gt; </i><br>
<i>&gt; device `pnm:0' is a Noname PNM file reader virtual device</i><br>
<i>&gt; device `pnm:1' is a Noname PNM file reader virtual device</i><br>
<i>&gt; device `mustek:0x36b' is a Mustek MFC-06000CZ flatbed scanner</i><br>
<i>&gt; </i><br>
<i>&gt; Looks quite nice I think, the scanner moves about a centimeter up and down, lamp</i><br>
<i>&gt; goes on, no problem..</i><br>
<i>&gt; </i><br>
<i>&gt; But when I acctually want to scan an image the scanner gives me the same action</i><br>
<i>&gt; as the 'initialisation' as mentioned above but then locks up. CTRL-C sais:</i><br>
<i>&gt; stopping scanner... but this has no effect I have to kill the scanimage process</i><br>
<i>&gt; and a 0 byte output file remains.</i><br>
<p>
I think i had a similar problem (with sane pre-1.00). The solution is an<br>
'usleep' inserted in sanei/sanei_ab306.c:<br>
***************<br>
/* Send a single command-byte over the AB306N-interface. */<br>
static void<br>
ab306_cout (Port *p, int val)<br>
{<br>
u_long base = p-&gt;base;<br>
<br>
usleep(100); &lt;&lt;&lt;================<br>
while ((ab306_inb (p, base + 1) &amp; 0x80)); /* wait for dir flag */<br>
ab306_outb (p, base, val);<br>
ab306_outb (p, base + 1, 0xe0);<br>
while ((ab306_inb (p, base + 1) &amp; 0x80) == 0); /* wait for ack<br>
*/<br>
ab306_outb (p, base + 1, 0x60);<br>
}<br>
****************<br>
I forgot who originally sent this patch to the mailing list.<br>
<p>
Also, you need a patch enabling correct color scanning, which i attach<br>
to this message. Again, i don't know the original author. I also don't<br>
know if these patches are already integrated in the current sane<br>
version.<br>
<p>
The Mustek 600 II N that we have at our institute is working fine with<br>
these patches, however sometimes there are colored horizontal stripes at<br>
the upper or at the lower edge of the picture. My remedy is to scan a<br>
larger area and then crop with xv or gimp.<br>
<p>
good luck.<br>
<pre>
--
<p>
Heinrich Rebehn
<p>
University of Bremen
Physics / Electrical and Electronics Engineering
- Department of Telecommunications -
<p>
E-mail: <a href="mailto:rebehn@comm.uni-bremen.de">mailto:rebehn@comm.uni-bremen.de</a>
Phone : +49/421/218-4664
Fax : -3341
--------------79BF5AD747BD2DD7B1AD4E54
Content-Type: text/plain; charset=us-ascii; name="patch1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="patch1"
<p>
diff -ruN sane-0.72.orig/backend/mustek.c sane-0.72/backend/mustek.c
--- sane-0.72.orig/backend/mustek.c Tue Mar 3 04:02:43 1998
+++ sane-0.72/backend/mustek.c Thu Apr 9 01:10:58 1998
@@ -1394,7 +1394,7 @@
}
}
- num_saved_lines = s-&amp;gt;ld.index[0] - s-&amp;gt;ld.index[2];
+ num_saved_lines = s-&amp;gt;ld.index[0] - s-&amp;gt;ld.index[1];
if (num_saved_lines &amp;gt; 0)
/* restore the previously saved lines: */
memcpy (out, s-&amp;gt;ld.buf[0], num_saved_lines * bpl);
@@ -1404,7 +1404,7 @@
if (++s-&amp;gt;ld.lmod3 &amp;gt;= 3)
s-&amp;gt;ld.lmod3 = 0;
- c = color_seq[s-&amp;gt;ld.lmod3];
+ c = s-&amp;gt;ld.lmod3;
if (s-&amp;gt;ld.index[c] &amp;lt; 0)
++s-&amp;gt;ld.index[c];
else if (s-&amp;gt;ld.index[c] &amp;lt; s-&amp;gt;params.lines)
@@ -1421,17 +1421,17 @@
DBG (1, "fix_line_distance_pp: lmod3=%d, index=(%d,%d,%d)\n",
s-&amp;gt;ld.lmod3,
s-&amp;gt;ld.index[0], s-&amp;gt;ld.index[1], s-&amp;gt;ld.index[2]);
- num_lines = s-&amp;gt;ld.index[2] - s-&amp;gt;ld.ld_line;
+ num_lines = s-&amp;gt;ld.index[1] - s-&amp;gt;ld.ld_line;
/* copy away the lines with at least one missing
color component, so that we can interleave them
with new scan data on the next call */
- num_saved_lines = s-&amp;gt;ld.index[0] - s-&amp;gt;ld.index[2];
+ num_saved_lines = s-&amp;gt;ld.index[0] - s-&amp;gt;ld.index[1];
memcpy (s-&amp;gt;ld.buf[0], out + num_lines * bpl,
num_saved_lines * bpl);
/* notice the number of lines we processed */
- s-&amp;gt;ld.ld_line = s-&amp;gt;ld.index[2];
+ s-&amp;gt;ld.ld_line = s-&amp;gt;ld.index[1];
/* return number of complete (r+g+b) lines */
return num_lines;
}
<p>
--------------79BF5AD747BD2DD7B1AD4E54--
<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="0143.html">Dr. Andreas Bolsch: "Re: resolution option unknown"</a>
<li> <b>Previous message:</b> <a href="0141.html">Oliver Rauch: "NEW: xsane-0.12 available"</a>
<li> <b>Maybe in reply to:</b> <a href="0130.html">Rene Vellekoop: "resolution option unknown"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0143.html">Dr. Andreas Bolsch: "Re: resolution option unknown"</a>
<!-- reply="end" -->
</ul>