sane-project-website/old-archive/1998-01/0270.html

89 wiersze
3.5 KiB
HTML

<!-- received="Sat Jan 31 15:21:23 1998 PST" -->
<!-- sent="Sun, 01 Feb 1998 00:17:58 +0100" -->
<!-- name="Didier Carlier" -->
<!-- email="carlierd@acm.org" -->
<!-- subject="xscanimage, gtk and gamma curves." -->
<!-- id="199801312317.AAA11484@corto.sema.be" -->
<!-- inreplyto="" -->
<title>sane-devel: xscanimage, gtk and gamma curves.</title>
<h1>xscanimage, gtk and gamma curves.</h1>
<b>Didier Carlier</b> (<a href="mailto:carlierd@acm.org"><i>carlierd@acm.org</i></a>)<br>
<i>Sun, 01 Feb 1998 00:17:58 +0100</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#270">[ date ]</a><a href="index.html#270">[ thread ]</a><a href="subject.html#270">[ subject ]</a><a href="author.html#270">[ author ]</a>
<!-- next="start" -->
<li> <b>Previous message:</b> <a href="0269.html">Kevin R. Charter: "Startup problems with SnapScan backend appear fixed."</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
This a question about the handling of gamma curves with more than 256 entries.<br>
<p>
The coolscan scanner uses tables with 2048 entries and I declared them like<br>
this: <br>
<p>
scanner-&gt;opt[OPT_GAMMA_VECTOR].name = SANE_NAME_GAMMA_VECTOR;<br>
scanner-&gt;opt[OPT_GAMMA_VECTOR].title = SANE_TITLE_GAMMA_VECTOR;<br>
scanner-&gt;opt[OPT_GAMMA_VECTOR].desc = SANE_DESC_GAMMA_VECTOR;<br>
scanner-&gt;opt[OPT_GAMMA_VECTOR].type = SANE_TYPE_INT;<br>
scanner-&gt;opt[OPT_GAMMA_VECTOR].unit = SANE_UNIT_NONE;<br>
scanner-&gt;opt[OPT_GAMMA_VECTOR].size = 2048 * sizeof (SANE_Word);<br>
scanner-&gt;opt[OPT_GAMMA_VECTOR].constraint_type = SANE_CONSTRAINT_RANGE;<br>
scanner-&gt;opt[OPT_GAMMA_VECTOR].constraint.range = &amp;gamma_range; /* 0-&gt;2047 */<br>
<p>
If I press the 'linear' button on the right of the gamma curves displayed by<br>
xscanimage, the backend is passed a gamma table which looks very good:<br>
<p>
[coolscan] 000: 0000 0001 0002 0003 0004 0005 0006 0007<br>
[coolscan] 008: 0008 0009 0010 0011 0012 0013 0014 0015<br>
[coolscan] 016: 0016 0017 0018 0019 0020 0021 0022 0023<br>
...<br>
[coolscan] 2024 2024 2025 2026 2027 2028 2029 2030 2031<br>
[coolscan] 2032 2032 2033 2034 2035 2036 2037 2038 2039<br>
[coolscan] 2040 2040 2041 2042 2043 2044 2045 2046 2047<br>
<p>
However, if I press on the gamma button and enter 1.8 in the pop-up window, I<br>
get the following:<br>
<p>
[coolscan] 000: 0000 0000 0000 0000 0000 0000 0000 0083<br>
[coolscan] 008: 0083 0083 0083 0083 0083 0122 0122 0122<br>
[coolscan] 016: 0122 0122 0122 0122 0153 0153 0153 0153<br>
....<br>
[coolscan] 2024 2043 2043 2043 2043 2043 2043 2043 2043<br>
[coolscan] 2032 2043 2043 2043 2043 2047 2047 2047 2047<br>
[coolscan] 2040 2047 2047 2051 2051 2051 2051 2051 2051<br>
<p>
There are 2 problems here:<br>
- the curve is not as smooth as it could be,<br>
- the last 6 points are outside of the requested range.<br>
<p>
I could handle the second problem within the backend code, but the first one<br>
is much less obvious.<br>
<p>
Am I doing something wrong ? Is this a known problem/limitation ?<br>
<p>
Kind regards,<br>
Didier<br>
<br>
<p>
<p>
<p>
<p>
<p>
<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">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Previous message:</b> <a href="0269.html">Kevin R. Charter: "Startup problems with SnapScan backend appear fixed."</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>