Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, February 17, 2008 5:17:26 AM(UTC)

heegar  
heegar

Groups: Registered
Posts: 6


Can you make a sample in c# VS2005 2.0 which will query the chosen scanner for capabilities which can be set, and the range it supports?

I'm trying to write a program which will be used on different scanners. We are trying to not show any dialog's to the user. I noticed that with static settings images are pretty different looking on different scanners.

Quality is a must for this project.

Thanks
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, February 18, 2008 3:25:42 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

You can do that by reading the value of the CAP_SUPPORTEDCAPS capability (TwainCapabilityType.SupportedCaps in LEADTOOLS 15 .NET classes).
For an example on how to use similar Array capabilities, see the help topic for the TwainArrayCapability Class.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Monday, February 18, 2008 4:23:55 AM(UTC)

heegar  
heegar

Groups: Registered
Posts: 6


I need a little bit more help then that if possible. Could you give me an example for 1 capability? Specifically will you please write an example of querying a scanner for the acceptable range of Contrast values, then set the capability to be at the 70% value?

I currently have a scanner that supports -127 to 127, but my program will be used on other scanners that may be 0 to 255, or even more different than that (i have no experience in the matter...).

Some help would be greatly appreciated.
 
#4 Posted : Tuesday, February 19, 2008 5:51:56 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

The following code will give you the values of the min, max and step size of the ICAP_CONTRAST capability:
+--------------+
TwainCapability twCap = new TwainCapability();
twCap.Information.ContainerType = TwainContainerType.Range; twCap.Information.Type = TwainCapabilityType.ImageContrast;

twCap.RangeCapability.ItemType = TwainItemType.Fix32;
twCap = _twainSession.GetCapability(TwainCapabilityType.ImageContrast, TwainGetCapabilityMode.GetValues);

MessageBox.Show("min = " + twCap.RangeCapability.MinimumValue.ToString());
MessageBox.Show("max = " + twCap.RangeCapability.MaximumValue.ToString());
MessageBox.Show("step = " + twCap.RangeCapability.StepSize.ToString());
+--------------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.179 seconds.