Re: Mustek Bugreport (Gamma didn't work)

Gernot Zander (hifi@scorpio.in-berlin.de)
Sun, 30 Nov 1997 21:12:21 +0100 (MET)

Hi,

> Looks like your mail is incomplete:
>
> Gernot> Hi, I tried sane today and wondered why the setting of gamma
> Gernot> table seemed to be ignored by the scanner (although it
> Gernot> worked with muscan) and after long houres I moved the 4
> Gernot> lines for start_scan() in sane_start() downwards below the
> Gernot> lines for the transmission of the gamma table, so it looks
> Gernot> now:
>

There was a . at the begin of the line, maybe this irritated
one MTA.

> Also, may I suggest to use sane-devel@mostang.com?

It affacts the mustek driver only, but I send a copy there...

Here the mail again complete (without "."):

I tried sane today and wondered why the setting of gamma table
seemed to be ignored by the scanner (although it worked with muscan)
and after long houres I moved the 4 lines for start_scan()
in sane_start() downwards below the lines for the transmission
of the gamma table, so it looks now:
_.
_. (more gamma_correction())
_.
status = gamma_correction (s, MUSTEK_CODE_BLUE);
}
}
else
status = gamma_correction (s, MUSTEK_CODE_GRAY);

if (status != SANE_STATUS_GOOD)
goto stop_scanner_and_return;
/********* start_scan() _after_ gamma has been set *********/
s->scanning = SANE_TRUE;

status = start_scan (s);
if (status != SANE_STATUS_GOOD)
goto stop_scanner_and_return;

s->ld.max_value = 0;
if (s->hw->flags & MUSTEK_FLAG_SINGLE_PASS)
_.
_.
_.

Now the gamma works. I've seen you have the lines for backtrack_and_adf
twice, one above and one below the start_scan(). Maybe the same
should be done with the gamma correction too, but I only have the
600CX and don't know if other models require this after start_scan().

I noticed a second problem: It depends of the position of
custom-gamma[=yes] in the command line if the values for x and y
are honored or not, if I give:

scanimage -d net:localhost:mustek:/dev/scanner --mode gray -t 11 -l 30
-x 150 -y 105 --custom-gamma --gamma-table=[0]0-[10]32-[64]128-[255]255
--resolution 150 > delme.pnm

they are ignored (!), and a full page (from -t and -l) is scanned,

if I do:
scanimage -d net:localhost:mustek:/dev/scanner --mode gray -t 11 -l 30
--custom-gamma -x 150 -y 105 --gamma-table=[0]0-[10]32-[64]128-[255]255
--resolution 150 > delme.pnm
then it works fine.
But I didn't found the reason for that.

Version:
lake:~# scanimage -V
scanimage (sane) 0.67

mfg.
Gernot

-- 
<hifi@scorpio.in-berlin.de> (Gernot Zander)
Um Rekursion zu verstehen, muß man entweder einen kennen, der
sie versteht, oder sie schon verstanden haben. (M. Freericks)

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com