sane-project-website/old-archive/2000-12/0051.html

223 wiersze
7.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-2022-jp">
<TITLE>sane-devel: The scan mode of the preview and the scan</TITLE>
<META NAME="Author" CONTENT="Mitsuru Okaniwa (m-okaniwa@bea.hi-ho.ne.jp)">
<META NAME="Subject" CONTENT="The scan mode of the preview and the scan">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>The scan mode of the preview and the scan</H1>
<!-- received="Thu Dec 7 19:49:31 2000" -->
<!-- isoreceived="20001208034931" -->
<!-- sent="Fri, 8 Dec 2000 12:49:54 +0900" -->
<!-- isosent="20001208034954" -->
<!-- name="Mitsuru Okaniwa" -->
<!-- email="m-okaniwa@bea.hi-ho.ne.jp" -->
<!-- subject="The scan mode of the preview and the scan" -->
<!-- id="006101c060ca$1cd8bb80$6425530a@necpcuser" -->
<!-- charset="iso-2022-jp" -->
<STRONG>From:</STRONG> Mitsuru Okaniwa (<A HREF="mailto:m-okaniwa@bea.hi-ho.ne.jp?Subject=Re:%20The%20scan%20mode%20of%20the%20preview%20and%20the%20scan&In-Reply-To=&lt;006101c060ca$1cd8bb80$6425530a@necpcuser&gt;"><EM>m-okaniwa@bea.hi-ho.ne.jp</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu Dec 07 2000 - 19:49:54 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0052.html">Jeffrey H. Ingber: "Re: Which scanners REALLY provide 36 bit output? HP?"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0050.html">Bob Washburne: "Which scanners REALLY provide 36 bit output? HP?"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#51">[ date ]</A>
<A HREF="index.html#51">[ thread ]</A>
<A HREF="subject.html#51">[ subject ]</A>
<A HREF="author.html#51">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi
<BR>
I could use the xscanimage with the CanoScanFB620S by many and kind help of
<BR>
Mr.Abel Deuring.
<BR>
I have the next problem to modify &quot;Fine color&quot; in the Scan mode of the
<BR>
preview and the scan.
<BR>
In addition to &quot;Fine color&quot; scan mode, CanoScanFB620S has the &quot;Color&quot; scan
<BR>
mode.
<BR>
But the preview and the scan speed in &quot;Fine color&quot; scan mode is very slower
<BR>
than the speed in &quot;Color&quot; scan mode.
<BR>
So, I would like to modify in the following way.
<BR>
<P>When I select &quot;Fine color&quot; scan mode in the pulldown menu of xscanimage, at
<BR>
the only preview running &quot;Color&quot; scan mode is selected behind the GUI. And
<BR>
at the actual scanning by pushing the button of &quot;Scan&quot;, &quot;Fine color&quot; scan
<BR>
mode is selected.
<BR>
<P>The source code about this is the following part of the canon-sane.c.
<BR>
===========================================================================
<BR>
#if 1
<BR>
&nbsp;&nbsp;DBG (3, &quot;sane_start: sending DEFINE SCAN MODE for scan control
<BR>
conditions\n&quot;);
<BR>
&nbsp;&nbsp;memset (wbuf, 0, sizeof (wbuf));
<BR>
&nbsp;&nbsp;wbuf[0] = 0x20;
<BR>
&nbsp;&nbsp;wbuf[1] = 14;
<BR>
<P>&nbsp;&nbsp;/* modification for FB620S */
<BR>
&nbsp;&nbsp;if ( s-&gt;hw-&gt;info.model == FB620 &amp;&amp; strcmp (mode_str, &quot;Fine color&quot;) == 0)
<BR>
&nbsp;&nbsp;{
<BR>
<P>&nbsp;&nbsp;&nbsp;wbuf[15] = 1 &lt;&lt; 3; &lt;=====This parameter is &quot;1&quot; then &quot;Fine color&quot; is
<BR>
available.
<BR>
<P>&nbsp;&nbsp;}
<BR>
&nbsp;&nbsp;else
<BR>
<P>&nbsp;&nbsp;&nbsp;wbuf[15] = 0; &lt;=====This parameter is &quot;0&quot; then &quot;Fine color&quot; is not
<BR>
available.
<BR>
<P><P>&nbsp;&nbsp;/* For preview use always normal speed: */
<BR>
&nbsp;&nbsp;if (s-&gt;val[OPT_PREVIEW].w == SANE_FALSE)
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;wbuf[11] = s-&gt;scanning_speed;
<BR>
&nbsp;&nbsp;status = define_scan_mode (s-&gt;fd, SCAN_CONTROL_CONDITIONS, wbuf);
<BR>
&nbsp;&nbsp;if (status != SANE_STATUS_GOOD)
<BR>
&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;DBG (1, &quot;define scan mode failed: %s\n&quot;, sane_strstatus (status));
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;return (status);
<BR>
&nbsp;&nbsp;}
<BR>
<P>&nbsp;&nbsp;DBG (3, &quot;sane_start: sending GET SCAN MODE for scan control
<BR>
conditions\n&quot;);
<BR>
&nbsp;&nbsp;memset (ebuf, 0, sizeof (ebuf));
<BR>
&nbsp;&nbsp;buf_size = sizeof (ebuf);
<BR>
&nbsp;&nbsp;status = get_scan_mode (s-&gt;fd, SCAN_CONTROL_CONDITIONS, ebuf, &amp;buf_size);
<BR>
&nbsp;&nbsp;if (status != SANE_STATUS_GOOD)
<BR>
&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;DBG (1, &quot;sane_start: GET SCAN MODE for scan control conditions
<BR>
failed\n&quot;);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;sanei_scsi_close (s-&gt;fd);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;return (SANE_STATUS_INVAL);
<BR>
&nbsp;&nbsp;}
<BR>
&nbsp;&nbsp;for (i=0; i&lt;buf_size; i++)
<BR>
&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;DBG(3, &quot;scan mode byte[%d] = %d\n&quot;, i, ebuf[i]);
<BR>
&nbsp;&nbsp;}
<BR>
#endif
<BR>
===========================================================================
<BR>
I would like to change this program as follows.
<BR>
<P>When I select the &quot;Fine color&quot; scan mode...
<BR>
1. At the preview running, &quot;wbuf[15] = 0&quot; in the define_scan_mode function
<BR>
is selected.
<BR>
2. At the actual &quot;Scan&quot; not the preview, &quot;wbuf[15] = 1 &lt;&lt; 3&quot; in the
<BR>
define_scan_mode function is selected.
<BR>
<P>But if I select the &quot;Fine color&quot; scan mode, wbuf[15] = 1 &lt;&lt; 3 in the
<BR>
define_scan_mode function is running at both the preview and the actual
<BR>
scan.
<BR>
I don't know the way of the modification about this problem.
<BR>
Does anybody have a good idea ?
<BR>
<P>The canon backend files are in the Web page of &quot;SANE backend for Canon
<BR>
scanners&quot;.
<BR>
regards,
<BR>
<P>-----------------------------
<BR>
Mitsuru Okaniwa
<BR>
email : <A HREF="mailto:m-okaniwa@bea.hi-ho.ne.jp?Subject=Re:%20The%20scan%20mode%20of%20the%20preview%20and%20the%20scan&In-Reply-To=&lt;006101c060ca$1cd8bb80$6425530a@necpcuser&gt;">m-okaniwa@bea.hi-ho.ne.jp</A>
<BR>
tel : (Japan)0566-26-6105
<BR>
-----------------------------
<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:%20The%20scan%20mode%20of%20the%20preview%20and%20the%20scan&In-Reply-To=&lt;006101c060ca$1cd8bb80$6425530a@necpcuser&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0052.html">Jeffrey H. Ingber: "Re: Which scanners REALLY provide 36 bit output? HP?"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0050.html">Bob Washburne: "Which scanners REALLY provide 36 bit output? HP?"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#51">[ date ]</A>
<A HREF="index.html#51">[ thread ]</A>
<A HREF="subject.html#51">[ subject ]</A>
<A HREF="author.html#51">[ 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 Dec 07 2000 - 19:50:03 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>