Dr. Mu has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone have experience interfacing Perl to a Twain driver? I would like to download photos from a digicam into a Perl/Tk app. I've checked all the usual haunts -- CPAN, Google, search of PM (Mark Twain comes up a few times) -- to no avail.

Thanks!

Replies are listed 'Best First'.
Re: Interface to Twain?
by dree (Monsignor) on Aug 16, 2002 at 12:30 UTC
    On CPAN there is a recent module for you: Win32::Scanner-EZTWAIN that is: An interface to the classic EZTWAIN library.
    It's only a 0.01 release, but it's a good point to start! :)
      Got it. Tried it. It works as advertised. Thanks!
Re: Interface to Twain?
by grep (Monsignor) on Aug 16, 2002 at 05:49 UTC
    Well Twain is a windows thing. So it makes a big difference which OS you are on. Sane would be your choice if you are on *nix. Either way I have not seen an perl interface to either.

    Your best bet would most likely be going through Gimp with the Gimp.pm module. Gimp does support Sane and I would guess it supports Twain on Win32.

    grep
    Just me, the boy and these two monks, no questions asked.

Re: Interface to Twain?
by dws (Chancellor) on Aug 16, 2002 at 06:01 UTC
    Does anyone have experience interfacing Perl to a Twain driver? I would like to download photos from a digicam into a Perl/Tk app.

    You'll probably have to settle for finding a DOS program to grab snaps off of your webcam. Drive the program from Perl, and pull the JPGs into a Perl/Tk window.