OT: scanning
Brian K. White
brian at aljex.com
Fri Oct 29 07:53:08 PDT 2010
On 10/29/2010 9:35 AM, Fairlight wrote:
> On Fri, Oct 29, 2010 at 06:06:38AM -0700, after drawing runes in goat's blood,
> Bob Rasmussen cast forth these immortal, mystical words:
>> The Windows module (twain32.dll) is a common interface to the Twain
>> drivers supplied by the various scanners. Talking to twain32.dll is like
>> talking to the GDI to do printing. There are still a zillion details to
>> deal with.
>
> He's dealing with C code...should be par for the course. :)
I was gonna say just what Bob said.
It's very much not simple to use twain directly and I'm not even
slightly remotely anywhere near able to even think about it.
That's why there are almost no free twain implementations, and none of
them even remotely feature rich, but there are dozens of commercial
libraries that cost hundreds to thousands of dollars. Anyone trying to
do twain discovers the same thing and buys a library like dtwain. In
fact even dtwain is a bit beyond me. I use twainsave, which uses dtwain
internally.
The library I currently use does a loooot of work to present me with a
single function call. When debugging an "El Cheapacabbra" HP all-in-one
recently, running the lib with it's debug log enabled, you wouldn't
believe the conversation that goes on back & forth to set up and the
perform a scan.
Something like 750k of text of twain commands going back & forth, and
that's just the failed scan, no image data transfer.
And even more joy, Bob said some discovery has to go on. Right, it
should be obvious, not all scanners or their drivers support all
features defined in the standard right? So the standard includes
commands so that an application can ask a scanner driver "do you support
capability X?" etc, and then gracefully operate the scanner by only
using functions it supports. Makes sense right? A well written app will
use those commands to avoid problems.
Problem is, merely asking the scanner some of these questions choked the
scanner! How can you win when the very act of performing due diligence
itself breaks the thing?
--
bkw
More information about the Filepro-list
mailing list