TWAIN was developed by a consortium of software and hardware manufacturers to standardize the communication between software applications and image acquisition devices. The interface is optimized for acquisition of graphic images. The TWAIN standard is widely supported by scanner manufacturers, with the widely used version of TWAIN being 1.9 (as of this writing). In addition to scanners, TWAIN is being used with digital cameras and video capture boards. ImageGear supports all three TWAIN Transfer Modes: Native Data Transfer Mode (which is the TWAIN default), Disk File Transfer, and Buffered Memory.
A TWAIN-compliant image acquisition device is one whose device driver complies with TWAIN specification. The device driver understands the TWAIN protocol, thus allowing interaction with the Data Source Manager, the main interface module of the TWAIN software. The Data Source Manager "manages the session" between the application program and the raster-generating data source. Three software elements work together in TWAIN: the application, the Data Source (DS), and the Data Source Manager (DSM) as shown below:
This section uses the following terminology when discussing ImageGear scanning functionality:
- Data Source: Software provided by the manufacturer of the device. Windows refers to this as a "Device Driver". It must be installed on the system where your application program will run.
- Data Source Manager: The TWAIN manager for the device drivers. This is software developed by the TWAIN consortium to provide a common mechanism for managing and using the Data Sources from all the different device manufacturers. It must be installed on the system where your application will run.
-
Device: Any device from which images can be acquired using the TWAIN protocol, including scanners and cameras.
The TWAIN Data Source for your device and the TWAIN Data Source Manager should be included as part of your scanner software. They are not part of the ImageGear software.
ImageGear supports TWAIN 1.6, 1.7, 1.8, and 1.9, working with a wide variety of scanner devices, digital cameras, and video capture boards. No TWAIN toolkit is easier or more comprehensive.
The TWAIN version may be verified by using the function IG_TWAIN_driver_info_get(). This function returns two integer values: one for the major release number, and the other for the minor release number. The example code provided with your product includes a call to this function.
ImageGear includes a wide array of methods, providing the developer with detailed control of the scanning process, including control of the following:
- TWAIN transfer mode
- Available TWAIN device listing
- Scanning area
- Brightness and contrast
- Dots-per-inch (resolution)
- Display of the TWAIN UI
- Setting an event to gain control during scanning
- ADF (Automatic Document Feeder) for multi-page scanning
- Scanner capabilities
ImageGear provides flexibility in working with TWAIN. This section provides an overview of all of the ways in which you may shape your sessions with TWAIN.