Fast TWAIN (Scan Configurations)

The performance of a TWAIN scanner can vary based on its scan configuration. The TWAIN driver of your TWAIN scanner comes with one or more "default" scan configurations. In addition, the user may create one or more user-defined scan configurations. LEAD provides several functions to determine the best and fastest scan configuration available, thereby letting you use the best and fastest scan configuration for scanning images.

To determine the best and fastest scan configuration for your TWAIN scanner, call L_TwainFindFastConfig. This function will test either an array of user-defined scan configurations, or all the default scan configurations present for the TWAIN driver of the current TWAIN scanner, based on the values of the pInFastConfigs and the nInFastConfigsCount parameters. For each scan configuration tested, the L_TwainFindFastConfig function calls the LTWAINFINDFASTCONFIG callback function. This callback function receives the information for the scan configuration being tested. This lets you interact with the scan configuration information as needed.

Since the list of default scan configurations present for a specific TWAIN driver can be rather numerous, you can narrow the list you wish to test using the L_TwainGetScanConfigs function. This function gets default scan configurations based on the transfer mode, bits per pixel, and number of buffers. To get a list of scan configurations for a specific transfer mode, pass this list of scan configurations to the L_TwainFindFastConfig function, and decrease the number of default scan configurations that must be tested.

Both L_TwainFindFastConfig and L_TwainGetScanConfigs allocate storage for an array of FASTCONFIG structures that contain scan configurations. This storage must be freed by calling L_TwainFreeScanConfig when the array is no longer needed.

After the best scan configuration has been determined, the scan configuration information can be passed to the L_TwainAcquireMulti or L_TwainFastAcquire so that the images will be acquired as quickly as possible.

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.