This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Sunday, February 17, 2008 5:17:26 AM(UTC)
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
#2
Posted
:
Monday, February 18, 2008 3:25:42 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
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)
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)
Groups: Registered, Tech Support
Posts: 1,326
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.