sane-project-website/old-archive/1997-02/0044.html

89 wiersze
3.9 KiB
HTML

<!-- received="Thu Apr 3 00:11:48 1997 MST" -->
<!-- sent="03 Apr 1997 00:01:57 -0700" -->
<!-- name="Gordon Matzigkeit" -->
<!-- email="gord@m-tech.ab.ca" -->
<!-- subject="Re: 0.50: xscan parameters label problems" -->
<!-- id="199704030402.VAA10651@panda.mosberger" -->
<!-- inreplyto="Wed, 2 Apr 1997 13:51:03 -0700" -->
<title>sane-devel: Re: 0.50: xscan parameters label problems</title>
<h1>Re: 0.50: xscan parameters label problems</h1>
<b>Gordon Matzigkeit</b> (<a href="mailto:gord@m-tech.ab.ca"><i>gord@m-tech.ab.ca</i></a>)<br>
<i>03 Apr 1997 00:01:57 -0700</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#44">[ date ]</a><a href="index.html#44">[ thread ]</a><a href="subject.html#44">[ subject ]</a><a href="author.html#44">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0045.html">Mathias Weigt: "color scanning and MFS-6000CX"</a>
<li> <b>Previous message:</b> <a href="0043.html">David Mosberger-Tang: "gtk-tooltips.diff.gz"</a>
<li> <b>In reply to:</b> <a href="0042.html">David Mosberger-Tang: "Re: 0.50: xscan parameters label problems"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Hi!<br>
<p>
<i>&gt;&gt;&gt;&gt;&gt; David Mosberger-Tang writes:</i><br>
<p>
<i>&gt;&gt;&gt;&gt;&gt; On 02 Apr 1997 12:03:59 -0700, Gordon Matzigkeit &lt;<a href="mailto:gord@m-tech.ab.ca">gord@m-tech.ab.ca</a>&gt; said:</i><br>
Gord&gt; Hi! When I set my PINT scanner to scan really big, high<br>
Gord&gt; resolution pictures, xscan doesn't like me.<br>
<p>
DM&gt; I guess that means the PINT backend is working, more or<br>
DM&gt; less---great! ;-)<br>
<p>
Yeah, as I said... I just need to get a good way to dynamically<br>
determine valid parameter ranges, then things will be usable by the<br>
public at large. I'm also running into problems with how to cancel a<br>
PINT scan, but that's PINT's fault, not yours...<br>
<p>
DM&gt; I don't see why this should overflow even on a 32 bit machine.<br>
DM&gt; Can you look into this?<br>
<p>
I don't really know what weirdness was happening with sign-extension,<br>
or whatever, but the following patch fixes my problems.<br>
<p>
--- xscan.c~ Tue Apr 1 13:44:43 1997<br>
+++ xscan.c Wed Apr 2 21:13:34 1997<br>
@@ -230,7 +230,7 @@<br>
if (sane_get_parameters (gsg_dialog_get_device (dialog), &amp;params)<br>
== SANE_STATUS_GOOD)<br>
{<br>
- long size = 10 * params.bytes_per_line * params.lines;<br>
+ unsigned long size = 10 * params.bytes_per_line * params.lines;<br>
const char *unit = "B";<br>
<br>
if (size &gt;= 10 * 1024 * 1024)<br>
<p>
DM&gt; Aside from the overflow: note that the depth parameter is the<br>
DM&gt; depth _per channel_, so it probably ought to be 8 instead (none<br>
DM&gt; of the frontends currently support more than that).<br>
<p>
Okay, thanks.<br>
<p>
DM&gt; Did you return an info value with SANE_INFO_RELOAD_PARAMS on when<br>
DM&gt; xscan set the color-&gt;grayscale option? If you don't set that<br>
DM&gt; bit, xscan won't now that it should update the parameters.<br>
<p>
This works now. Thanks for your help,<br>
<p>
<pre>
--
Gord Matzigkeit | Proudly running pieces of the GNU operating system.
gord@m-tech.ab.ca | Jacques Cousteau loved programming in assembler.
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.azstarnet.com/~axplinux/sane/">http://www.azstarnet.com/~axplinux/sane/</a>
To unsubscribe: mail -s unsubscribe <a href="mailto:sane-devel-request@listserv.azstarnet.com">sane-devel-request@listserv.azstarnet.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0045.html">Mathias Weigt: "color scanning and MFS-6000CX"</a>
<li> <b>Previous message:</b> <a href="0043.html">David Mosberger-Tang: "gtk-tooltips.diff.gz"</a>
<li> <b>In reply to:</b> <a href="0042.html">David Mosberger-Tang: "Re: 0.50: xscan parameters label problems"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>