sane-project-website/old-archive/1997-05/0019.html

77 wiersze
3.5 KiB
HTML

<!-- received="Mon May 26 10:20:54 1997 MST" -->
<!-- sent="Mon, 26 May 1997 09:43:57 -0700" -->
<!-- name="David Mosberger-Tang" -->
<!-- email="davidm@azstarnet.com" -->
<!-- subject="Re: a priori image dimensions" -->
<!-- id="199705261643.JAA15681@panda.mosberger" -->
<!-- inreplyto="86g1vap7a2.fsf@localhost.profitpress.com" -->
<title>sane-devel: Re: a priori image dimensions</title>
<h1>Re: a priori image dimensions</h1>
<b>David Mosberger-Tang</b> (<a href="mailto:davidm@azstarnet.com"><i>davidm@azstarnet.com</i></a>)<br>
<i>Mon, 26 May 1997 09:43:57 -0700</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#19">[ date ]</a><a href="index.html#19">[ thread ]</a><a href="subject.html#19">[ subject ]</a><a href="author.html#19">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0020.html">becka@sunserver1.rz.uni-duesseldorf.de: "Re: a priori image dimensions"</a>
<li> <b>Previous message:</b> <a href="0018.html">Gordon Matzigkeit: "a priori image dimensions"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt;&gt;&gt;&gt;&gt; On 26 May 1997 09:44:37 -0600, Gordon Matzigkeit &lt;<a href="mailto:gord@m-tech.ab.ca">gord@m-tech.ab.ca</a>&gt; said:</i><br>
<p>
Gord&gt; Hi! Here's question for the list before I spend the time to<br>
Gord&gt; download sane-0.57...<br>
<p>
Gord&gt; A problem that I've discovered in my PINT backend is that the<br>
Gord&gt; dimensions (both X and Y) cannot be known until the scan is<br>
Gord&gt; started. I've noticed the following line in the TODO:<br>
<p>
That is correct. But x can be known before the first chunk of data is<br>
read. The specs allow only y to be unknown once a scan has started<br>
(primarily to accommodate hand-scanners).<br>
<p>
Gord&gt; - xscan: scanning of images whose heights is not known a<br>
Gord&gt; priori is not supported yet; this is going to be important for<br>
Gord&gt; handheld scanners<br>
<p>
Gord&gt; Does anybody have ideas on how to implement this, and/or has<br>
Gord&gt; it been done in 0.57?<br>
<p>
The code in preview.c handles this properly, but the actual scan<br>
engine in xscanimage.c doesn't. In standalone mode, we could use code<br>
similar to the one in scanimage.c whereas in GIMP mode we would have<br>
to increase the image size as scanning progresses.<br>
<p>
Gord&gt; The easiest way I can think of is to have a call to<br>
Gord&gt; sane_get_parameters after the scan has completed to find out<br>
Gord&gt; what actually happened.<br>
<p>
The problem is that sane_get_parameters() will return a height of -1<br>
for hand-scanners, so you do have to read all the data to find how<br>
tall the image is.<br>
<p>
Gord&gt; Maybe space for the PNM header could be reserved before the<br>
Gord&gt; raw data is written, such as:<br>
<p>
That sounds like a reasonable strategy as it would maintain the<br>
property that xscanimage never buffers an entire image itself.<br>
<p>
--david<br>
<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="0020.html">becka@sunserver1.rz.uni-duesseldorf.de: "Re: a priori image dimensions"</a>
<li> <b>Previous message:</b> <a href="0018.html">Gordon Matzigkeit: "a priori image dimensions"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>