Re: [patch] Re: sane-0.57 available

David Mosberger-Tang (davidm@azstarnet.com)
Thu, 15 May 1997 07:25:35 -0700

>>>>> On Thu, 15 May 1997 09:39:24 +0200 (MET DST), Matthias Lautner <l=
autner@hoggle.syscomp.de> said:

Matthias> Hi! First some technical data about my scanner: The
Matthias> scanner is labeled MFS-12000CX [mustek] attach: firmware
Matthias> revision 2.71 [mustek] attach: found Mustek scanner model
Matthias> MFS-12000CX (flatbed scanner), 3-pass

Thanks for the info!

Matthias> I implemented the patch for contrast & brightness Now the
Matthias> maximum range in the brightness controll of xscanimage is
Matthias> -36% .. 36% and -84% .. 84% for contrast. Is this right?

Yup, according to the manual, that's correct.

Matthias> The brightness and contrast is still calculated wrong for
Matthias> 3-pass mustek scanners. The result ranges from 1 to 24,
Matthias> it should be 0 to 24. change in function
Matthias> encode_percentage() in mustek.c code =3D (int) ((value /
Matthias> quant) + 0.5) + 0x0c; to code =3D (int) ((value / quant) +
Matthias> 12.5);

Ah, right, the negative values get truncated in the "wrong" direction.
I changed my source to your (working) version.

Matthias> The errors: "Failed to set value of option
Matthias> red-gamma-table: Device busy." between the passes of a
Matthias> 3-pass scan originates in a call to gsg_sync(dialog) in
Matthias> the function scan_start(void) in xscanimage.c. It seems,
Matthias> that a redraw of the gamma tables send the gamma values to
Matthias> the scanner (which doesn=B4t want to be disturbed while
Matthias> working.)

Ouch. I'll look into this.

Matthias> I enabled brightness and contrast in color mode. It works
Matthias> pretty!

Great! I changed the sources so the brightness/contrast controls are
enabled for 3-pass scanners.

Matthias> The progress bar stops at each scan after about 90% and
Matthias> proceeds to 100% on the next pass of a 3 pass scan. The
Matthias> value of the bar is calculated right, but it is not
Matthias> updated on the screen.

Hmmh, could you try putting:

if (ScanWin.input_tag < 0)
=09while (gdk_events_pending ())
=09 gtk_main_iteration ();

right below:

=09 if (status =3D=3D SANE_STATUS_EOF)
=09 {

in xscanimage.c and see whether that helps (just search for
SANE_STATUS_EOF---there is only one in the entire file).

Matthias> My scanner manual says that there are 12 internal patterns
Matthias> for halftone scanning. How can they be activated.

The docs I have make no mention of builtin halftone patterns, so I
don't know how to select them (does any other Mustek scanner program
support this? if so, maybe you could find out from there).

Matthias> Does
Matthias> anybody knows something about the format of customized
Matthias> half-tone patterns?

I don't.

=09--david

--
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com