LEADTOOLS Support
Imaging
Imaging SDK Questions
Using TwainSession.SaveTemplate to save a subset of all settings the scanning device supports
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, July 10, 2014 6:17:29 AM(UTC)
Groups: Registered, Tech Support
Posts: 207
Was thanked: 3 time(s) in 3 post(s)
The attached project illustrates a new overload added to the TwainSession.SaveTemplate function. This new overload allows you pass an array of
TwainCapabilityType values (or just integers for custom capabilities) that you wish to have saved to disk. You can save all possible values, just the default value, or the currently set value to disk for each capability. This differs from the original function in that the original only saved all all capabilities to disk.
By saving only a subset of the capabilities a scanner supports, you allow the resulting file to be more easily used between scanner models and scanner manufacturers. For instance, most scanners support the ability to adjust whether to scan in color, black and white, gray, and so on. Most also support the ability to adjust their bit depth, resolution, orientation, and contrast or brightness.
For the user who only cares about these capabilities and no others, now you can save just these settings to disk and reuse them in many different scanners without fear of incompatibility.
The attached demo allows you to modify the CAP_FEEDERENABLED, ICAP_PIXELTYPE, ICAP_BITDEPTH, , ICAP_XRESOLUTION, ICAP_YRESOLUTION and ICAP_BRIGHTNESS capabilities. You can make adjustments, scan, and see your results.
You can save just these settings to disk or save all settings to disk and then load them again to see the GUI adjust to the setting stored in the file.
The application is written in Visual Studio 2010 using .NET 4.0 x86 configuration with LEADTOOLS version 18
Edited by moderator Friday, August 9, 2019 10:52:11 AM(UTC)
| Reason: Not specified
Travis Montgomery
Senior Sales Engineer
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
LEADTOOLS Support
Imaging
Imaging SDK Questions
Using TwainSession.SaveTemplate to save a subset of all settings the scanning device supports
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.