[sane-devel] How to get infrared image data with sane on an epson v700 scanner?

Olaf Meeuwissen olaf.meeuwissen at avasys.jp
Mon Jan 31 23:55:25 UTC 2011

"m. allan noah" <kitno455 at gmail.com> writes:

> There is some code in sane to expose additional image types like jpeg
> and IR. It is disabled because it's not compatible with the sane
> specification. It does work with scanimage, however.
> So, you would need to get usb logs of either the windows driver or
> vuescan making an IR second pass, and figure out how to make those
> same calls from within the backend.

The epson2 backend contains code to get at the IR data already.  That
was actually the driving force behind the (incompatible) changes to the
SANE specification.  In order to use it, it looks like you need to:

 - compile with SANE_FRAME_IR defined.  Easiest way to do that is via:

     ./configure CPPFLAGS=-DSANE_FRAME_IR

 - change some code in epson2.c to make sure MODE_INFRARED does not get
   disabled for the GT-X900.  The snippet you're looking for is:

        /* disable infrared on unsupported scanners */
        if (!e2_model(s, "GT-X800") && !e2_model(s, "GT-X700"))
                mode_list[MODE_INFRARED] = NULL;

   Just add a '&& !e2_model(s, "GT-X900")" to the if clause.

That ought to make things work but I have no idea what the result will
be nor how the whole thing works.

Hope this helps,

> On Mon, Jan 31, 2011 at 8:21 AM, Alain Culos <sane-devel at asoundmove.net> wrote:
>> Hi all,
>> It seems that it is not possible to use sane to read infrared data (second
>> pass) with my Epson Perfection V700 scanner out of the box. However vuescan
>> can do this. It seems quite simple since this is a two-pass process, it
>> should be a matter of sending the right command to the scanner and getting a
>> plain B&W image back instead of 3-channel colour.
>> So are there any options to get that working with SANE? Any known patch? Any
>> configuration behind the scenes? Any undocumented feature?

See above.

>> Of particular interest is the 6400dpi resolution in 16bits per channel to
>> scan slides, so I need the infrared option on the epkowa driver as the
>> epson2 driver seems limited to 3200dpi anyway.

There is no infrared support in the epkowa backend.  You could try
porting the epson2 IR support (and send me a patch ;-) but you'd still
need the (incompatible) changes to the SANE specification to get things
to work.

Hope this helps,
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom

More information about the sane-devel mailing list