[sane-devel] scanimage & epson with gamma correction

Henning Meier-Geinitz henning@meier-geinitz.de
Sat, 19 Jul 2003 11:24:07 +0200


Hi,


On Sat, Jul 19, 2003 at 10:03:52AM +0100, Iain Mac Donald wrote:
> Thanks for the info.

As I said I don't have an Epson scanner for testing. So the epson
backend maintainer may have the authorative answer :-)

> The option as listed in the man page is
> 
> "--red-gamma-table 0..255,...
>         Gamma-correction table for the red band."
> 
> Colour correction options do have inactive flags.

Ooops, it looks like scanimage doesn't print "inactive" dor array-like
functions. That needs to be fixed, I think.

By the way: Be careful with the scanimage manpage. It only lists
examples. The options are "generated" by the backends, not scanimage.
So your backend may have different options than those mentioned in the
manpage. scanimage --help is authorative.

> > I think "--gamma-correction" must be used before --red-gamma-table in
> > the command line. Does "scanimage --help" list "User Defined"  as a
> > possible value for --gama-correction?
> 
> I had tried the option in lots of positions ;-)
> The man page (scanimage --help...) states 
> 
> "--gamma-correction Default|User defined|High density printing|Low
> density printing|High contrast printing [Default]
>         Selectes the gamma correction value from a list of pre-defined
> devices
>         or the user defined table, which can be downloaded to the
> scanner"

--gamma-correction "User defined" --red-gamma-table 0,1,2,3,...
should work in this case. But maybe I missed some other option?

> > The argument for the --red-gamma-table is the gamma table itself, not
> > a filename. You can generate gamma tables with gamma4scanimage.
> > 
> 
> I have used gamma4scanimage and a very handy tool it is too. So rather
> than referencing a file I have placed the table on the command line
> didn't work though. Maybe I need to try a few more combinations.

I think the "setting inactive option" is a different error, it's not
connected to the kind of the argument.

> What confuses me though is it appears that xsane does correct the gamma.
> Or is xsane changing the value before showing the picture in the viewer?

XSane can do both: Use its own gamma tables applied after scanning the
image and use the gamma table options of the backend. If the backend
provides gamma table options, they will be used by scanimage.

Maybe setting the environment variable SANE_DEBUG_EPSON=255 and
calling scanimage after that shows a hint what's wrong?

Bye,
  Henning