sane-project-website/old-archive/2000-09/0291.html

198 wiersze
7.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: FIX: color scanning problems with snapscans in</TITLE>
<META NAME="Author" CONTENT="Lawrence Glaister (lg@jfm.bc.ca)">
<META NAME="Subject" CONTENT="Re: FIX: color scanning problems with snapscans in sane 1.0.3">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: FIX: color scanning problems with snapscans in sane 1.0.3</H1>
<!-- received="Thu Sep 28 09:41:42 2000" -->
<!-- isoreceived="20000928164142" -->
<!-- sent="Thu, 28 Sep 2000 09:56:56 -0700" -->
<!-- isosent="20000928165656" -->
<!-- name="Lawrence Glaister" -->
<!-- email="lg@jfm.bc.ca" -->
<!-- subject="Re: FIX: color scanning problems with snapscans in sane 1.0.3" -->
<!-- id="02e601c0296d$1c3fef20$bf0aa8c0@dufusiii" -->
<!-- inreplyto="Pine.LNX.4.21.0009281258350.23034-100000@preon.physik.uni-mainz.de" -->
<STRONG>From:</STRONG> Lawrence Glaister (<A HREF="mailto:lg@jfm.bc.ca?Subject=Re:%20FIX:%20color%20scanning%20problems%20with%20snapscans%20in%20sane%201.0.3&In-Reply-To=&lt;02e601c0296d$1c3fef20$bf0aa8c0@dufusiii&gt;"><EM>lg@jfm.bc.ca</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu Sep 28 2000 - 09:56:56 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0292.html">Oliver Rauch: "Re: io error on xsane"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0290.html">ken fisher: "Problems w/Sane Preferences"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0297.html">Lawrence Glaister: "Re: FIX: color scanning problems with snapscans in sane 1.0.3"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#291">[ date ]</A>
<A HREF="index.html#291">[ thread ]</A>
<A HREF="subject.html#291">[ subject ]</A>
<A HREF="author.html#291">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi Richard,
<BR>
thankyou for the feedback on the change.... I am surprised you see the same
<BR>
problems with the 1236s as I thought the problem was only related to usb
<BR>
connected scanners. I did end up removing the change below and modifying the
<BR>
code in two other places.
<BR>
In backend/snapscan-sources.c RGBRouter_remaining(), I added a check for
<BR>
a -ve return code and if negative, I returned 1. This is a really gross hack
<BR>
but was required to get my scanner working at 600dpi. I know the reason for
<BR>
the problem (scan would hang forever without moving the scanhead) and have
<BR>
discussed it with Steve Underwood, but have not come up with a cleaner fix
<BR>
yet. The second change was in backend/snapscan-sources.c FDSource_get().
<BR>
At the bottom of the if (errno==EAGAIN) code, remove the break and add 2
<BR>
lines: usleep(10000); and continue;
<BR>
This will clear up the problem that the resulted in corrupted color images
<BR>
or missing scanner data. You can return the code in RGBRouter_get() to
<BR>
normal as the problem is fixed by the EAGAIN patch above.
<BR>
I would like a little more feedback from snapscan users and some more
<BR>
testing by myself before proposing the fixes as patches.
<BR>
<P>=======================================================
<BR>
Lawrence Glaister VE7IT email: <A HREF="mailto:lg@jfm.bc.ca?Subject=Re:%20FIX:%20color%20scanning%20problems%20with%20snapscans%20in%20sane%201.0.3&In-Reply-To=&lt;02e601c0296d$1c3fef20$bf0aa8c0@dufusiii&gt;">lg@jfm.bc.ca</A>
<BR>
1462 Madrona Drive <A HREF="http://jfm.bc.ca">http://jfm.bc.ca</A>
<BR>
Nanoose Bay BC Canada
<BR>
V9P 9C9
<BR>
=======================================================
<BR>
----- Original Message -----
<BR>
From: Richard B. Kreckel &lt;<A HREF="mailto:kreckel@ginac.de?Subject=Re:%20FIX:%20color%20scanning%20problems%20with%20snapscans%20in%20sane%201.0.3&In-Reply-To=&lt;02e601c0296d$1c3fef20$bf0aa8c0@dufusiii&gt;">kreckel@ginac.de</A>&gt;
<BR>
To: &lt;<A HREF="mailto:lg@jfm.bc.ca?Subject=Re:%20FIX:%20color%20scanning%20problems%20with%20snapscans%20in%20sane%201.0.3&In-Reply-To=&lt;02e601c0296d$1c3fef20$bf0aa8c0@dufusiii&gt;">lg@jfm.bc.ca</A>&gt;
<BR>
Sent: Thursday, September 28, 2000 4:03 AM
<BR>
Subject: Re: FIX: color scanning problems with snapscans in sane 1.0.3
<BR>
<P><P><EM>&gt; Hello,
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; I just wanted to thank you. I have an Agfa SnapScan 1236 S and sane 1.0.3
</EM><BR>
<EM>&gt; from Debian/woody and was getting images all messed with stripes when
</EM><BR>
<EM>&gt; scanning color images. I applied the 1/2 liner you proposed:
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; ndata2 = ndata;
</EM><BR>
<EM>&gt; ndata3 = 0;
</EM><BR>
<EM>&gt; do
</EM><BR>
<EM>&gt;
</EM><BR>
<P><EM>&gt; /* read data from the TxSource and fill our buffer */
</EM><BR>
<EM>&gt; status = TxSource_get (pself, ps-&gt;cbuf + start + ndata3,
</EM><BR>
&amp;ndata2);
<BR>
<EM>&gt; // bogus if (status != SANE_STATUS_GOOD || ndata2 == 0)
</EM><BR>
<EM>&gt; &lt;==========line to change
</EM><BR>
<EM>&gt; if (status != SANE_STATUS_GOOD)
</EM><BR>
<EM>&gt;
</EM><BR>
<P><EM>&gt; /* I believe we should only return here on bad status */
</EM><BR>
<EM>&gt; DBG (1, &quot;RGBRouter_get OOPS early return %d %d\n&quot;,status,ndata2);
</EM><BR>
<EM>&gt; *plen -= remaining;
</EM><BR>
<EM>&gt; return status;
</EM><BR>
<EM>&gt; }
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Now it seems to work fine. Hope this piece of information could be useful
</EM><BR>
<EM>&gt; for you. Will this patch be applied to future versions?
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Regards
</EM><BR>
<EM>&gt; -richy.
</EM><BR>
<EM>&gt; --
</EM><BR>
<EM>&gt; Richard Kreckel
</EM><BR>
<EM>&gt; &lt;<A HREF="mailto:Richard.Kreckel@Uni-Mainz.DE?Subject=Re:%20FIX:%20color%20scanning%20problems%20with%20snapscans%20in%20sane%201.0.3&In-Reply-To=&lt;02e601c0296d$1c3fef20$bf0aa8c0@dufusiii&gt;">Richard.Kreckel@Uni-Mainz.DE</A>&gt;
</EM><BR>
<EM>&gt; &lt;<A HREF="http://wwwthep.physik.uni-mainz.de/~kreckel/">http://wwwthep.physik.uni-mainz.de/~kreckel/</A>&gt;
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;
</EM><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?Subject=Re:%20FIX:%20color%20scanning%20problems%20with%20snapscans%20in%20sane%201.0.3&In-Reply-To=&lt;02e601c0296d$1c3fef20$bf0aa8c0@dufusiii&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0292.html">Oliver Rauch: "Re: io error on xsane"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0290.html">ken fisher: "Problems w/Sane Preferences"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0297.html">Lawrence Glaister: "Re: FIX: color scanning problems with snapscans in sane 1.0.3"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#291">[ date ]</A>
<A HREF="index.html#291">[ thread ]</A>
<A HREF="subject.html#291">[ subject ]</A>
<A HREF="author.html#291">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Thu Sep 28 2000 - 09:45:52 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>