Acquiring an image using TWAIN and Delphi

A sample application using TwainControlX

This example shows a simple Delphi application to acquire an image from a TWAIN device (scanner or webcam), display the image and save it to disk.

To use this demo, you will need to download two files:

Trial version of the ActiveX control TwainControlX. (1.5MB)

Zip file of Delphi demo project. (10kB)

Install TwainControlX, then extract the Delphi demo files from tcx_demo_delphi.zip to a single directory. Import the OCX control TwainControlX into Delphi.

The device to be used is selected from a ComboBox. This is populated with the names of all installed devices when the project is first run.

A CheckBox can be used to choose whether or not to display the default user interface of the device.

If the user interface is not to be displayed, the resolution, pixel type, and size of the image can be set by the user.