Jump to PiXCL Home page

FAQ: Understanding your Digicam or Scanner TWAIN data source.

All current scanners and most digital cameras have a means to allow third party softwares, typically image editors, to identify that an imaging device is present and available, and to acquire single frames, via a user interface. This interface is called the TWAIN data source (often called, incorrectly, the TWAIN driver). A calling application is described as being TWAIN-compatible.

According the the TWAIN web site, TWAIN is not an acronym for anything, but is commonly held to stand for Technology Without An Interesting Name (in fact it's a reference to "never the twain shall meet").

Most if not all recent USB and Firewire compatible digital still cameras appear to Explorer as a removeable disk drive when plugged in, which is very handy, but the installation process often also loads a Data Source (DS). Scanners, on the other hand, always install a DS of some sort, as this is how the users can adjust image parameters and control the scanner.

Windows also includes several minimal scanner DS that will run with many scanners, for example Microtek and OEM variants. These minimal DS are for the most part pretty useless, except to provide the basic capabilities for adjusting brightness and contrast, and acquiring an image.

The following refers to all current versions of Windows:

Let's start with locating your scanner or camera TWAIN data source. Using Explorer, locate the C:\WINDOWS\TWAIN_32 directory. If you have previously installed an imaging device, you should see a series of subdirectories listing the names of the device(s), and in these directories (and often more subdirectories under them) are the files written by the device installation process.

These files vary in name, type and content, but there will ALWAYS be one file with extension .DS. This is the device data source, and is simply a special DLL that starts your TWAIN device user interface (UI). Note that the UI may be contained in the DS, or other DLLs or even other installed EXE files elsewhere in your system.

You need to understand that manufacturers (or more correctly, their programmers) commonly create their DS code with a view that no-one could possibly want to run the device with their wonderful and intuitive (!) user interface turned off, hence there's no need to test the code in that mode, and moreover, there's no need to document what all the configuration and control files do. In many, if not most cases, this is not a problem for the average user. It does become an issue for the people (like you) who DO need to be able to get more control.

All DS are supposed to support a minimal set of gettable and settable parameters called capabilities. Most do, but unfortunately, some do not, even from some of the biggest names in the business.

In User Interface OFF mode, some capabilities can be set, report a success, but an immediate query may show that the capability has in fact not been set. Again, the reason is that very few people need or even know that the OFF mode exists, and testing was inadequate.

You will have to spend the time to dig around in your PC to find out as much undocumented details as you can. Here's some notes on where to start looking.


Registry Entries

Let's suppose that you have installed device from a company called XYZ ImageTech. There will often be some Registry entries in




You can start the Registry editor by clicking Start:Run:Regedit

These Registry entries usually contain all sorts of control parameters and filename string, in usually helpfully named keys, but not always.


Other EXE files

Look in C:\Program Files\XYZ ImageTech for additional files related to your scanner or camera. Some DS have minimal functionality, and simply start an EXE file elsewhere, with command line arguments, to begin the image acquisition.


TWACKER.EXE, the indispensable TWAIN test utility.

The TWAIN organization produced TWACKER ( ... TWAIN TWACKer...tweetybirds ... whatever) as a tool to test data sources and the various supported TWAIN commands. You can download a tweaked up version of TWACKER from our website.

In Summary ...

This discussion has been somewhat brief, because every scanner or digicam UI is different, and the specific details vary. A scanner or digicam device application written in PiXCL can use the supplied DS user interface, or in UI-OFF mode, use what ever options area available by direct programming using the set of TWAIN_* commands.

PiXCL 10 is completely free as soon as you register as a user.

Copyright 2011-2019 PiXCL Automation Technologies Inc, Canada. All Rights Reserved.