kopia lustrzana https://gitlab.com/sane-project/website
175 wiersze
6.4 KiB
HTML
175 wiersze
6.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: xscanimage, xsane and 3-pass scanners</TITLE>
|
||
|
<META NAME="Author" CONTENT="Henning Meier-Geinitz (hmg-ml@gmx.de)">
|
||
|
<META NAME="Subject" CONTENT="xscanimage, xsane and 3-pass scanners">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
||
|
<H1>xscanimage, xsane and 3-pass scanners</H1>
|
||
|
<!-- received="Fri Mar 31 12:58:38 2000" -->
|
||
|
<!-- isoreceived="20000331205838" -->
|
||
|
<!-- sent="Fri, 31 Mar 2000 22:56:33 +0200" -->
|
||
|
<!-- isosent="20000331205633" -->
|
||
|
<!-- name="Henning Meier-Geinitz" -->
|
||
|
<!-- email="hmg-ml@gmx.de" -->
|
||
|
<!-- subject="xscanimage, xsane and 3-pass scanners" -->
|
||
|
<!-- id="20000331225633.A25457@hmg1.vortex.swb.de" -->
|
||
|
<STRONG>From:</STRONG> Henning Meier-Geinitz (<A HREF="mailto:hmg-ml@gmx.de?Subject=Re:%20xscanimage,%20xsane%20and%203-pass%20scanners&In-Reply-To=<20000331225633.A25457@hmg1.vortex.swb.de>"><EM>hmg-ml@gmx.de</EM></A>)<BR>
|
||
|
<STRONG>Date:</STRONG> Fri Mar 31 2000 - 12:56:33 PST
|
||
|
<P>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0328.html">Peter Kirchgessner: "Re: SYM22801 & HP Scanjet 5P Sane problems..."</A>
|
||
|
<UL>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0326.html">Rogier Stam: "Re: SYM22801 & HP Scanjet 5P Sane problems..."</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#327">[ date ]</A>
|
||
|
<A HREF="index.html#327">[ thread ]</A>
|
||
|
<A HREF="subject.html#327">[ subject ]</A>
|
||
|
<A HREF="author.html#327">[ author ]</A>
|
||
|
</UL>
|
||
|
<HR NOSHADE><P>
|
||
|
<!-- body="start" -->
|
||
|
<P>
|
||
|
Hi,
|
||
|
<BR>
|
||
|
<P>at the moment I am trying to look at the problems reported for Mustek 3-pass
|
||
|
<BR>
|
||
|
scanners in color mode. I am using a MFS-12000CX scanner and lineart/gray
|
||
|
<BR>
|
||
|
works fine.
|
||
|
<BR>
|
||
|
<P>Color mode, however, results in endless error messages after the 3rd (blue)
|
||
|
<BR>
|
||
|
frame is scanned (both in xscanimage and xsane). The message is something
|
||
|
<BR>
|
||
|
like "Error during read: scan was cancelled". This doesn't occur if
|
||
|
<BR>
|
||
|
non_blocking mode is disabled in the backend.
|
||
|
<BR>
|
||
|
<P>I think the problem is in the frontends (correct me if I am wrong). The next
|
||
|
<BR>
|
||
|
paragraphs are about xscanimage but I think it's the same with xsane.
|
||
|
<BR>
|
||
|
<P>At the start of the scan "scan_start" is called. "input_available" does the
|
||
|
<BR>
|
||
|
reading of data and calls "scan_start" recursively until all 3 frames are
|
||
|
<BR>
|
||
|
finished. At the end of "scan_start" "input_available" is called directly,
|
||
|
<BR>
|
||
|
if the backend doesn't support non-blocking mode. That does work. However,
|
||
|
<BR>
|
||
|
in the case of non-blocking mode, gdk_input_add is used to let gdk look at
|
||
|
<BR>
|
||
|
the sane filedescriptor. However, gdk_input_add is called once for each
|
||
|
<BR>
|
||
|
frame (3 times in total) and at the end of the scan only one instance is
|
||
|
<BR>
|
||
|
killed (in "scan_done").
|
||
|
<BR>
|
||
|
<P> scan_win.input_tag = -1;
|
||
|
<BR>
|
||
|
if (sane_set_io_mode (dev, SANE_TRUE) == SANE_STATUS_GOOD
|
||
|
<BR>
|
||
|
&& sane_get_select_fd (dev, &fd) == SANE_STATUS_GOOD)
|
||
|
<BR>
|
||
|
scan_win.input_tag = gdk_input_add (fd, GDK_INPUT_READ |
|
||
|
<BR>
|
||
|
GDK_INPUT_EXCEPTION, input_available, 0);
|
||
|
<BR>
|
||
|
else
|
||
|
<BR>
|
||
|
input_available (0, -1, GDK_INPUT_READ);
|
||
|
<BR>
|
||
|
<P>As a quick hack I did the following:
|
||
|
<BR>
|
||
|
<P> if (sane_set_io_mode (dev, SANE_TRUE) == SANE_STATUS_GOOD
|
||
|
<BR>
|
||
|
&& sane_get_select_fd (dev, &fd) == SANE_STATUS_GOOD)
|
||
|
<BR>
|
||
|
{
|
||
|
<BR>
|
||
|
if (scan_win.param.format != SANE_FRAME_GREEN
|
||
|
<BR>
|
||
|
&& scan_win.param.format != SANE_FRAME_BLUE)
|
||
|
<BR>
|
||
|
{
|
||
|
<BR>
|
||
|
scan_win.input_tag = gdk_input_add (fd, GDK_INPUT_READ |
|
||
|
<BR>
|
||
|
GDK_INPUT_EXCEPTION, input_available, 0);
|
||
|
<BR>
|
||
|
}
|
||
|
<BR>
|
||
|
}
|
||
|
<BR>
|
||
|
else
|
||
|
<BR>
|
||
|
{
|
||
|
<BR>
|
||
|
scan_win.input_tag = -1;
|
||
|
<BR>
|
||
|
input_available (0, -1, GDK_INPUT_READ);
|
||
|
<BR>
|
||
|
}
|
||
|
<BR>
|
||
|
<P>This works for me. However, it is quite ugly and I don't know if the red
|
||
|
<BR>
|
||
|
frame is the first in every case. So I think, it would be better to have a
|
||
|
<BR>
|
||
|
flag for the first frame and don't use gdk_input_add for the others.
|
||
|
<BR>
|
||
|
<P>Another point: Don't try to scan an image with a 3-pass scanner into a pnm
|
||
|
<BR>
|
||
|
file on a NFS disc. It is extremely slow (about 2k per second!), probably
|
||
|
<BR>
|
||
|
because of the method used to put the three frames in the pnm file (write
|
||
|
<BR>
|
||
|
one byte, fseek two bytes, write one byte ...).
|
||
|
<BR>
|
||
|
<P>One more point: The TODO file is right about the progress bar not reaching
|
||
|
<BR>
|
||
|
100% at the end of each frame.
|
||
|
<BR>
|
||
|
<P>I tried to use the 3-pass scanner with scanimage but hadn't any luck because
|
||
|
<BR>
|
||
|
the scan stops before the first frame gets read (sane_cancel is called). I
|
||
|
<BR>
|
||
|
will look into this tomorrow.
|
||
|
<BR>
|
||
|
<P>Bye, 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:%20xscanimage,%20xsane%20and%203-pass%20scanners&In-Reply-To=<20000331225633.A25457@hmg1.vortex.swb.de>">majordomo@mostang.com</A>
|
||
|
</PRE>
|
||
|
<P><!-- body="end" -->
|
||
|
<HR NOSHADE>
|
||
|
<UL>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0328.html">Peter Kirchgessner: "Re: SYM22801 & HP Scanjet 5P Sane problems..."</A>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0326.html">Rogier Stam: "Re: SYM22801 & HP Scanjet 5P Sane problems..."</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#327">[ date ]</A>
|
||
|
<A HREF="index.html#327">[ thread ]</A>
|
||
|
<A HREF="subject.html#327">[ subject ]</A>
|
||
|
<A HREF="author.html#327">[ 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>Fri Mar 31 2000 - 12:59:52 PST</EM>
|
||
|
</EM>
|
||
|
</SMALL>
|
||
|
</BODY>
|
||
|
</HTML>
|