[sane-devel] [patch] --quality scan option for coolscan2 backend

Giuseppe Sacco giuseppe at eppesuigoccas.homedns.org
Sun Feb 25 12:32:20 CET 2007


Hi Andras,

Il giorno dom, 25/02/2007 alle 11.13 +0100, Major A ha scritto:
> > I finally started having a look at the coolscan2 backend. For my first
> > patch I added a new option, --quality, that may be used to activate the
> > "high quality scan" scanner option.
> 
> Thanks for taking over. I really don't have any time to spend on SANE
> at the moment. But what, exactly, is the high-quality option? Do you
> mean multisampling? For that to work, it's not sufficient to just set
> the relevant bits before scanning, you also have to actively read out
> the lines and sum them up yourself, the scanner doesn't do it for
> you. Also, not that not all scanners support multisampling. Also, if
> you mean multisampling, I'd call the option accordingly because
> "high-quality" doesn't really mean a lot.

This is not the multiread option, that you described. It is a different
option. If you have the Nikon specification called "COOLSCAN V ED I/F
PROTOCOL SPECIFICATIONS", its first description is in byte 5 of SET
WINDOW command. The documentation doesn't describe the difference when
setting or clearing the bit. The documentation also says that this bit
is not used with LS-50 and LS-5000 so I don't know what scanner
would/will use it.
I did this patch just for studying the coolscan2 code and the SANE API.

> > My next work will be on activating a new option, --greyscale, in order
> > to scan in greyscale instead of RGB.
> 
> Again, the scanner doesn't support that in hardware. And because it
> doesn't, I think it's better to scan RGB and leave the conversion to
> greyscale to the frontend or the user. (The scanner does have a
> single-colour mode, but that isn't greyscale, you can select one of
> the colour channels to be scanned exclusively, but I wouldn't call
> that greyscale).

You are right. I use scanimage and get ~60Mb for each scan at 4000dpi.
This is a bit overkill, so I would like to save tiff images in greyscale
instead of rgb colour.

Currently I scan images with scanimage/coolscan2 and then convert to
greyscale using netpbm or gimp. I saw that coolscan2 backend already
does an exposure with different values for r (1200), g (1200) and b
(1000), but I don't know what this implies when using b/w negative
films. I know that ppmtopgm (from netpbm) uses .299 r + .587 g + .114 b
for its conversion. Does this means that I should use the same exposure
time for all tree colour components?

Another question for scanimage is: could it be converted for using
libtiff? This would probably increase quality and add support for, among
other things, compressed tiff files.

> BTW, has anyone got the LS-50/5000 working in the end?

I am working with an LS-50. I also used the --negative option very
extensively, but I am currently working only with b/w films.

Bye,
Giuseppe



More information about the sane-devel mailing list