sane-project-website/old-archive/2000-04/0000.html

115 wiersze
4.4 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: scanimage and 3-pass scanners</TITLE>
<META NAME="Author" CONTENT="Henning Meier-Geinitz (hmg-ml@gmx.de)">
<META NAME="Subject" CONTENT="scanimage and 3-pass scanners">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>scanimage and 3-pass scanners</H1>
<!-- received="Sat Apr 1 02:32:22 2000" -->
<!-- isoreceived="20000401103222" -->
<!-- sent="Sat, 1 Apr 2000 12:27:52 +0200" -->
<!-- isosent="20000401102752" -->
<!-- name="Henning Meier-Geinitz" -->
<!-- email="hmg-ml@gmx.de" -->
<!-- subject="scanimage and 3-pass scanners" -->
<!-- id="20000401122752.A584@hmg1.vortex.swb.de" -->
<STRONG>From:</STRONG> Henning Meier-Geinitz (<A HREF="mailto:hmg-ml@gmx.de?Subject=Re:%20scanimage%20and%203-pass%20scanners&In-Reply-To=&lt;20000401122752.A584@hmg1.vortex.swb.de&gt;"><EM>hmg-ml@gmx.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Sat Apr 01 2000 - 02:27:52 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0001.html">Michael Krause: "Re: HP3300, documentation about non-SCL-scanners"</A>
<UL>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#0">[ date ]</A>
<A HREF="index.html#0">[ thread ]</A>
<A HREF="subject.html#0">[ subject ]</A>
<A HREF="author.html#0">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi,
<BR>
<P>I just tried to use scanimage to scan in color mode with a 3-pass scanner
<BR>
(Mustek MFS-12000CX). It doesn't work, the scan is cancelled immediately
<BR>
after the start of the first frame (sane_cancel is called).
<BR>
<P>I think I found an error in scanimage.c. Look at the following code snippet
<BR>
in scan_it ():
<BR>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!advance (&amp;image))
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status = SANE_STATUS_NO_MEM;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goto cleanup;
<BR>
<P>It's a check if the realloc in advance() succeded. I think the author of the
<BR>
program missed the {} around the two commands (as the indentation suggests).
<BR>
&quot;goto cleanup&quot; is called even if no error occured so the scan is stopped
<BR>
allways. Proposed correction:
<BR>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!advance (&amp;image))
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status = SANE_STATUS_NO_MEM;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goto cleanup;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>
This snipped is used three more times in the code. If I change all of them
<BR>
the scan is successful.
<BR>
<P>This should concern everyone using a 3-pass scanner and color mode.
<BR>
<P>Could somebody with more knowledge in the frontends look into it and fix it
<BR>
if I am correct?
<BR>
<P>Ciao, 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?Subject=Re:%20scanimage%20and%203-pass%20scanners&In-Reply-To=&lt;20000401122752.A584@hmg1.vortex.swb.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0001.html">Michael Krause: "Re: HP3300, documentation about non-SCL-scanners"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#0">[ date ]</A>
<A HREF="index.html#0">[ thread ]</A>
<A HREF="subject.html#0">[ subject ]</A>
<A HREF="author.html#0">[ 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>Sat Apr 01 2000 - 02:33:19 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>