About TWAIN

Top  Previous  Next

TWAIN is the software protocol that makes it possible to directly transfer images from image-capturing devices, like scanners and digital cameras, to applications.

Without TWAIN, you would first need to save the image to a disc and only after that the user application will be able to open it.

Thanks to TWAIN, application software and image-capturing devices can understand each other and interact.

Image-capturing devices work via TWAIN data source usually called TWAIN driver. Not only a real device, like scanner and digital camera, but a software as well can serve as a data source.

The following IDPhotoCapture products support the work as data sources:

inPhoto ID Webcam

inPhoto ID PS

inPhoto ID SLR

IDPhoto Processor

inPhoto Capture PS

inPhoto Capture SLR

TWAIN protocol comes with a data transfer standard and API interface. TWAIN drivers are applications for managing image-capturing devices written on the basis of the TWAIN interface. Normally, TWAIN drivers have a graphical interface and function as a data source control panel. TWAIN drivers also allow configuring image settings, such as colour balance, size, gamma range, etc. before the image is received by the application. Sets of settings in TWAIN drivers differ depending on a data source device.

Image transfer with TWAIN involves user application, supporting TWAIN protocol to which the image will be transferred and TWAIN driver which serves as an image source. Most applications for image handling are currently supporting TWAIN, however please refer to the application supplier or to the documents to find out about such a possibility.

Only application can initiate an image transfer, so it is from this that the TWAIN call have to start.

Various applications have their own commands for receiving files from a data source. Normally, these commands are found in the File menu and labelled as Acquire or Import. In some applications, you need to previously indicate a data source. For this purpose, a TWAIN source command is used which is also normally found in the File menu.

Diagram of image transfer via TWAIN.

1.A user selects and starts the TWAIN driver from the application to which the image is to be transferred.

2.After a TWAIN driver call, the application enters the standby mode and waits for response of the driver on the image readiness for being transferred. The application may be locked in standby mode. In reality, the behaviour of each application may differ and depends on the features included into it by developers.

3.While the application is waiting, the driver becomes a main controlling unit. The user manages a data acquisition device and captures an image.

4.After the image is captured, the driver transfers it to the waiting application.

5.After the transfer process is finished, the application may demand to close the driver. Further transfer via TWAIN is impossible with closed driver. For re-transferring the image, you need to start the procedure from the very beginning, calling out the driver from the application again.