kopia lustrzana https://gitlab.com/sane-project/website
78 wiersze
3.5 KiB
HTML
78 wiersze
3.5 KiB
HTML
|
<!-- received="Tue Oct 20 20:14:07 1998 PDT" -->
|
||
|
<!-- sent="Wed, 21 Oct 1998 03:17:35 +0200 (MEST)" -->
|
||
|
<!-- name="becka@rz.uni-duesseldorf.de" -->
|
||
|
<!-- email="becka@rz.uni-duesseldorf.de" -->
|
||
|
<!-- subject="Re: Pixels vs. Bytes per Line" -->
|
||
|
<!-- id="m0zVmu7-000CEkC@hades.beck-sw.de" -->
|
||
|
<!-- inreplyto="362CDC62.8617F77C@ic.ac.uk" -->
|
||
|
<title>sane-devel: Re: Pixels vs. Bytes per Line</title>
|
||
|
<h1>Re: Pixels vs. Bytes per Line</h1>
|
||
|
<a href="mailto:becka@rz.uni-duesseldorf.de"><i>becka@rz.uni-duesseldorf.de</i></a><br>
|
||
|
<i>Wed, 21 Oct 1998 03:17:35 +0200 (MEST)</i>
|
||
|
<p>
|
||
|
<ul>
|
||
|
<li> <b>Messages sorted by:</b> <a href="date.html#219">[ date ]</a><a href="index.html#219">[ thread ]</a><a href="subject.html#219">[ subject ]</a><a href="author.html#219">[ author ]</a>
|
||
|
<!-- next="start" -->
|
||
|
<li> <b>Next message:</b> <a href="0220.html">Mentore #cat# Siesto: "Epson GT-300, scanimage results"</a>
|
||
|
<li> <b>Previous message:</b> <a href="0218.html">Bernd Schroeder: "Re: Black Widow Scanners (Was "Does anybody recognize this inquiry information ?")"</a>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
</ul>
|
||
|
<!-- body="start" -->
|
||
|
<i>> I've encountered the following ambiguity:</i><br>
|
||
|
<i>> scanimage seems to rely on params.bytes_per_line,</i><br>
|
||
|
<i>> xscanimage for the real scan, too, whereas</i><br>
|
||
|
<i>> for the preview on params.pixels_per_line. </i><br>
|
||
|
<p>
|
||
|
This is probably because the preview actually interprets the image.<br>
|
||
|
However it should not be used for _reading_ the data. Just for interpreting<br>
|
||
|
it.<br>
|
||
|
<p>
|
||
|
<i>> Mustek scanners have problems in color mode with</i><br>
|
||
|
<i>> odd resolutions (i.e. different from 75, 150,...).</i><br>
|
||
|
<i>> So resolution is increased to the next even one and </i><br>
|
||
|
<i>> the image scaled according to the desired one.</i><br>
|
||
|
<i>> But I forgot to update params.pixels_per_line causing xscanimage to</i><br>
|
||
|
<i>> crash sometimes. </i><br>
|
||
|
<p>
|
||
|
This is a bug. Both values are guaranteed to be correct.<br>
|
||
|
<p>
|
||
|
<i>> But it is intention to have this (except for lineart)</i><br>
|
||
|
<i>> redundancy? Which is the authoritative variable?</i><br>
|
||
|
<p>
|
||
|
Both. They are not redundant, as modes that have a depth that is not a<br>
|
||
|
multiple of 8 bits might require padding.<br>
|
||
|
<p>
|
||
|
Thus you always read bytes_per_line * lines bytes (except if lines==-1,<br>
|
||
|
handscanner mode). Well actually at best you read until sane_read<br>
|
||
|
returns SANE_STATUS_EOF.<br>
|
||
|
<p>
|
||
|
The pixels_per_line is there for informative purposes regarding clipping at<br>
|
||
|
the right edge, padding, etc.<br>
|
||
|
<p>
|
||
|
<p>
|
||
|
Note that the number of bytes per line can be larger than the minimum<br>
|
||
|
value imposed by the right side of this equation. A frontend must be<br>
|
||
|
able to properly cope with such `padded' image formats.<br>
|
||
|
<p>
|
||
|
CU,ANdy<br>
|
||
|
<p>
|
||
|
<pre>
|
||
|
--
|
||
|
= Andreas Beck | Email : <<a href="mailto:andreas.beck@ggi-project.org">andreas.beck@ggi-project.org</a>> =
|
||
|
<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">majordomo@mostang.com</a>
|
||
|
</pre>
|
||
|
<!-- body="end" -->
|
||
|
<p>
|
||
|
<ul>
|
||
|
<!-- next="start" -->
|
||
|
<li> <b>Next message:</b> <a href="0220.html">Mentore #cat# Siesto: "Epson GT-300, scanimage results"</a>
|
||
|
<li> <b>Previous message:</b> <a href="0218.html">Bernd Schroeder: "Re: Black Widow Scanners (Was "Does anybody recognize this inquiry information ?")"</a>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
</ul>
|