kopia lustrzana https://gitlab.com/sane-project/website
228 wiersze
9.0 KiB
HTML
228 wiersze
9.0 KiB
HTML
<!-- received="Wed May 14 09:29:10 1997 MST" -->
|
|
<!-- sent="Wed, 14 May 1997 09:16:08 -0700" -->
|
|
<!-- name="David Mosberger-Tang" -->
|
|
<!-- email="davidm@azstarnet.com" -->
|
|
<!-- subject="[patch] Re: sane-0.57 available" -->
|
|
<!-- id="199705141616.JAA15860@panda.mosberger" -->
|
|
<!-- inreplyto="199705140854.KAA27559@hoggle.syscomp.de" -->
|
|
<title>sane-devel: [patch] Re: sane-0.57 available</title>
|
|
<h1>[patch] Re: sane-0.57 available</h1>
|
|
<b>David Mosberger-Tang</b> (<a href="mailto:davidm@azstarnet.com"><i>davidm@azstarnet.com</i></a>)<br>
|
|
<i>Wed, 14 May 1997 09:16:08 -0700</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#147">[ date ]</a><a href="index.html#147">[ thread ]</a><a href="subject.html#147">[ subject ]</a><a href="author.html#147">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0148.html">becka@sunserver1.rz.uni-duesseldorf.de: "Re: Scanner and Printer - Copier"</a>
|
|
<li> <b>Previous message:</b> <a href="0146.html">Reimond Rombey: "Scanner and Printer - Copier"</a>
|
|
<li> <b>In reply to:</b> <a href="0146.html">Reimond Rombey: "Scanner and Printer - Copier"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|
|
<!-- body="start" -->
|
|
<i>>>>>> On Wed, 14 May 1997 10:54:55 +0200 (MET DST), Matthias Lautner <l=</i><br>
|
|
<a href="mailto:autner@hoggle.syscomp.de">autner@hoggle.syscomp.de</a>> said:<br>
|
|
<p>
|
|
Matthias> Hi! I tested sane-0.57 on my MFS-12000CX 3-pass scanner<br>
|
|
Matthias> and got errors while scanning color images with gamma<br>
|
|
Matthias> table allthough the scanned image looks good.<br>
|
|
<p>
|
|
I don't see off-hand what's going wrong (and am a bit short of time).<br>
|
|
The red/green/blue gamma tables should not be set at all for 3-pass<br>
|
|
scanners (each pass, a (different) gray-scale gamma table should be<br>
|
|
down-loaded only). Can you investigate? For debugging purposes, it's<br>
|
|
recommended to run configure with --disable-shared.<br>
|
|
<p>
|
|
Matthias> The progress bar of xscanimage stops at each scan after<br>
|
|
Matthias> about 90% and proceeds to 100% on the next pass<br>
|
|
<p>
|
|
Hmmh, the next pass should use a _new_ progress bar. Is that not<br>
|
|
what's happening?<br>
|
|
<p>
|
|
Matthias> Halftone scanning with xscanimage: pattern size 0 works<br>
|
|
Matthias> good. In all other cases the Pattern box has only a<br>
|
|
Matthias> horizontal Line. How can I set the patterns. xscanimage<br>
|
|
Matthias> offers only a curve to alter like gamma correction.<br>
|
|
<p>
|
|
Yeah, I'm not sure I really care about the half-tone pattern. If<br>
|
|
somebody knows how it's being used and what it's useful for, they can<br>
|
|
feel free to make it work. I'm sure there are some cases where this<br>
|
|
would be useful, but I haven't had any need for halftone scanning with<br>
|
|
customized half-tone pattern. I suspect what we'd need to support<br>
|
|
this properly is a "matrix" data type.<br>
|
|
<p>
|
|
Matthias> The brightness and contrast is calculated wrong for 3-pass<br>
|
|
Matthias> mustek scanners. change in function encode_percentage()<br>
|
|
Matthias> in mustek.c code =3D (int) ((value / 100.0 / quant) + 0.5) =<br>
|
|
+<br>
|
|
Matthias> 0x0c; to code =3D (int) (((value +100) / 100.0 * 12.0) +<br>
|
|
Matthias> 0.5); // quant is now unused<br>
|
|
<p>
|
|
Oh, there was indeed a bug in there. I the patch below should make<br>
|
|
it work correctly (at least according to my docs).<br>
|
|
<p>
|
|
Matthias> In color scanning the previous settings of brightness and<br>
|
|
Matthias> contrast from a former Lineart scan are used and take<br>
|
|
Matthias> effect. Why shouldn=B4t it be allowed to set brightness<br>
|
|
Matthias> and contrast in color mode?<br>
|
|
<p>
|
|
At least for single-pass scanners those controls have absolutely no<br>
|
|
effect in color mode (I confirmed this with Mustek). If you tell me<br>
|
|
that they work in color-mode for 3-pass scanners, just let me know and<br>
|
|
I'll enable them for those scanners.<br>
|
|
<p>
|
|
Oh, would you mind telling me what the label on the front of your<br>
|
|
scanner is? The firmware revision would be useful as well (see output<br>
|
|
of "SANE_DEBUG_MUSTEK=3D2 scanimage -d mustek -h >/dev/null").<br>
|
|
<p>
|
|
=09--david<br>
|
|
<p>
|
|
--- mustek.c~=09Sat May 10 15:05:11 1997<br>
|
|
+++ mustek.c=09Wed May 14 08:53:49 1997<br>
|
|
@@ -57,49 +57,65 @@<br>
|
|
static Mustek_Scanner *first_handle;<br>
|
|
=20<br>
|
|
static const SANE_String_Const mode_list[] =3D<br>
|
|
-{<br>
|
|
- "Lineart", "Halftone", "Gray",<br>
|
|
- "Color Lineart", "Color Halftone", "Color",<br>
|
|
- 0<br>
|
|
-};<br>
|
|
+ {<br>
|
|
+ "Lineart", "Halftone", "Gray",<br>
|
|
+ "Color Lineart", "Color Halftone", "Color",<br>
|
|
+ 0<br>
|
|
+ };<br>
|
|
=20<br>
|
|
static const SANE_String_Const speed_list[] =3D<br>
|
|
-{<br>
|
|
- "Slowest", "Slower", "Normal", "Faster", "Fastest",<br>
|
|
- 0<br>
|
|
-};<br>
|
|
+ {<br>
|
|
+ "Slowest", "Slower", "Normal", "Faster", "Fastest",<br>
|
|
+ 0<br>
|
|
+ };<br>
|
|
=20<br>
|
|
static const SANE_String_Const source_list[] =3D<br>
|
|
-{<br>
|
|
- "Flatbed", "Automatic Document Feeder", "Transparency Adapter",<br>
|
|
- 0<br>
|
|
-};<br>
|
|
+ {<br>
|
|
+ "Flatbed", "Automatic Document Feeder", "Transparency Adapter",<br>
|
|
+ 0<br>
|
|
+ };<br>
|
|
=20<br>
|
|
static const SANE_Int grain_list[] =3D<br>
|
|
-{<br>
|
|
- 6,=09=09=09=09/* # of elements */<br>
|
|
- 2, 3, 4, 5, 6, 8<br>
|
|
-};<br>
|
|
+ {<br>
|
|
+ 6,=09=09=09=09/* # of elements */<br>
|
|
+ 2, 3, 4, 5, 6, 8<br>
|
|
+ };<br>
|
|
=20<br>
|
|
static const SANE_Range u8_range =3D<br>
|
|
-{<br>
|
|
- 0,=09=09=09=09/* minimum */<br>
|
|
- 255,=09=09=09=09/* maximum */<br>
|
|
- 0=09=09=09=09/* quantization */<br>
|
|
-};<br>
|
|
+ {<br>
|
|
+ 0,=09=09=09=09/* minimum */<br>
|
|
+ 255,=09=09=09=09/* maximum */<br>
|
|
+ 0=09=09=09=09/* quantization */<br>
|
|
+ };<br>
|
|
=20<br>
|
|
static const SANE_Int pattern_dimension_list[] =3D<br>
|
|
-{<br>
|
|
- 8,=09=09=09=09/* # of elements */<br>
|
|
- 0, 2, 3, 4, 5, 6, 7, 8<br>
|
|
-};<br>
|
|
+ {<br>
|
|
+ 8,=09=09=09=09/* # of elements */<br>
|
|
+ 0, 2, 3, 4, 5, 6, 7, 8<br>
|
|
+ };<br>
|
|
=20<br>
|
|
static const SANE_Range percentage_range =3D<br>
|
|
-{<br>
|
|
- -100 << SANE_FIXED_SCALE_SHIFT,=09/* minimum */<br>
|
|
- 100 << SANE_FIXED_SCALE_SHIFT,=09/* maximum */<br>
|
|
- 1 << SANE_FIXED_SCALE_SHIFT=09/* quantization */<br>
|
|
-};<br>
|
|
+ {<br>
|
|
+ -100 << SANE_FIXED_SCALE_SHIFT,=09/* minimum */<br>
|
|
+ 100 << SANE_FIXED_SCALE_SHIFT,=09/* maximum */<br>
|
|
+ 1 << SANE_FIXED_SCALE_SHIFT=09/* quantization */<br>
|
|
+ };<br>
|
|
+<br>
|
|
+/* for three-pass (ax) scanners: */<br>
|
|
+<br>
|
|
+static const SANE_Range ax_brightness_range =3D<br>
|
|
+ {<br>
|
|
+ -36 << SANE_FIXED_SCALE_SHIFT,=09/* minimum */<br>
|
|
+ 36 << SANE_FIXED_SCALE_SHIFT,=09/* maximum */<br>
|
|
+ 3 << SANE_FIXED_SCALE_SHIFT=09/* quantization */<br>
|
|
+ };<br>
|
|
+<br>
|
|
+static const SANE_Range ax_contrast_range =3D<br>
|
|
+ {<br>
|
|
+ -84 << SANE_FIXED_SCALE_SHIFT,=09/* minimum */<br>
|
|
+ 84 << SANE_FIXED_SCALE_SHIFT,=09/* maximum */<br>
|
|
+ 7 << SANE_FIXED_SCALE_SHIFT=09/* quantization */<br>
|
|
+ };<br>
|
|
=20<br>
|
|
/* Color band codes: */<br>
|
|
#define MUSTEK_CODE_GRAY=09=090<br>
|
|
@@ -523,7 +539,7 @@<br>
|
|
}<br>
|
|
else<br>
|
|
{<br>
|
|
- code =3D (int) ((value / 100.0 / quant) + 0.5) + 0x0c;<br>
|
|
+ code =3D (int) ((value / quant) + 0.5) + 0x0c;<br>
|
|
max =3D 0x18;<br>
|
|
}<br>
|
|
if (code > max)<br>
|
|
@@ -1188,7 +1204,10 @@<br>
|
|
s->opt[OPT_BRIGHTNESS].cap |=3D SANE_CAP_INACTIVE;<br>
|
|
s->opt[OPT_BRIGHTNESS].unit =3D SANE_UNIT_PERCENT;<br>
|
|
s->opt[OPT_BRIGHTNESS].constraint_type =3D SANE_CONSTRAINT_RANGE;<br>
|
|
- s->opt[OPT_BRIGHTNESS].constraint.range =3D &percentage_range;<br>
|
|
+ if (s->hw->flags & MUSTEK_FLAG_SINGLE_PASS)<br>
|
|
+ s->opt[OPT_BRIGHTNESS].constraint.range =3D &percentage_range;<br>
|
|
+ else<br>
|
|
+ s->opt[OPT_BRIGHTNESS].constraint.range =3D &ax_brightness_range;<br>
|
|
s->val[OPT_BRIGHTNESS].w =3D 0;<br>
|
|
=20<br>
|
|
/* contrast */<br>
|
|
@@ -1201,7 +1220,10 @@<br>
|
|
s->opt[OPT_CONTRAST].cap |=3D SANE_CAP_INACTIVE;<br>
|
|
s->opt[OPT_CONTRAST].unit =3D SANE_UNIT_PERCENT;<br>
|
|
s->opt[OPT_CONTRAST].constraint_type =3D SANE_CONSTRAINT_RANGE;<br>
|
|
- s->opt[OPT_CONTRAST].constraint.range =3D &percentage_range;<br>
|
|
+ if (s->hw->flags & MUSTEK_FLAG_SINGLE_PASS)<br>
|
|
+ s->opt[OPT_CONTRAST].constraint.range =3D &percentage_range;<br>
|
|
+ else<br>
|
|
+ s->opt[OPT_CONTRAST].constraint.range =3D &ax_contrast_range;<br>
|
|
s->val[OPT_CONTRAST].w =3D 0;<br>
|
|
=20<br>
|
|
/* custom-gamma table */<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="0148.html">becka@sunserver1.rz.uni-duesseldorf.de: "Re: Scanner and Printer - Copier"</a>
|
|
<li> <b>Previous message:</b> <a href="0146.html">Reimond Rombey: "Scanner and Printer - Copier"</a>
|
|
<li> <b>In reply to:</b> <a href="0146.html">Reimond Rombey: "Scanner and Printer - Copier"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|