Getting and Setting Capabilities

Each TWAIN source may support a number of capabilities. These capabilities dictate the behavior of the TWAIN source. Before acquiring images from the selected TWAIN source, the user may wish to examine and change the capability settings for that source.

It is possible to check whether the installed scanner to the system supports certain capabilities. For more information, refer to How to Find Out Whether Your Scanner Supports Certain Capabilities Using Twacker, found on http://support.leadtools.com/SupportPortal/cs/forums/3781/ShowPost.aspx.

To begin this period of getting and setting the TWAIN source capabilities, the user must call L_TwainStartCapsNeg. The LEADTOOLS TWAIN toolkit provides the user low-level and high-level functionality for getting and setting the capabilities.

LEADTOOLS provides both low-level and high-level functions for getting and setting capabilities. The low-level functions get and set capabilities individually. The high-level functions let the user get and set specific capabilities, either singularly, or in groups.

Low-Level:

High-Level:

L_TwainGetResolution

L_TwainGetImageFrame

L_TwainGetImageUnit

L_TwainGetImageBitsPerPixel

L_TwainSetResolution

L_TwainSetImageFrame

L_TwainSetImageUnit

L_TwainSetImageBitsPerPixel

To get the custom data of TWAIN data source, call the L_TwainGetCustomDSData function, which is also saves the custom data to a file.

To update the custom data of TWAIN data source, call the L_TwainSetCustomDSData function, which is also loads the data from a file.