[sane-devel] scanimage & epson with gamma correction

Henning Meier-Geinitz henning@meier-geinitz.de
Sat, 19 Jul 2003 08:22:51 +0200


Hi,

On Fri, Jul 18, 2003 at 10:29:37PM +0100, Iain Mac Donald wrote:
> I have been trying to use scanimage to batch scan some colour slides on
> an Epson 2450 Photo. My purpose is to have a digital reference file for
> every slide without having to interactively edit each image. Scans using
> the standard settings usually appear too dark. I decided to use the
> --red-gamma-table option as the --brightness option did not produce the
> desired results. The command I used is shown below 
> 
> When doing this I get the error message
> 
> attempted to set inactive option red-gamma-table

Well, the option is not active :-) When you run "scanimage -h", you
should get an "inactive" marker after the option. 

> As an alternative I tried to use the --gamma-table option (not listed
> for epson) I received this error

That one is disabled in the source code.

> The scanimage -h man page specifically mentions the red-gamma-table
> option (and green, blue). I have also used the --gamma-correction 'User
> defined' option at the same time which is accepted but I still get the
> same error message. 

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?

> Otherwise everything works perfectly. Anyone have a working version of
> this or know what is wrong? Is gamma correction unsupported? Any help
> much appreciated.

I don't have an Epson scanner. But from the source code it looks like
that not all scanners support that feature.

> scanimage -d epson:/dev/usb/scanner0 --format=pnm --focus-position
> 'Focus 2.5mm above glass' --sharpness 2 --resolution 600 
> --red-gamma-table '/home/iain/.sane/gammatable.epson ' --source

The argument for the --red-gamma-table is the gamma table itself, not
a filename. You can generate gamma tables with gamma4scanimage.

Bye,
  Henning