Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

twain capability found but not supported!
Started by heegar at 07-03-2008 8:22. Topic has 7 replies.

Print Search « Previous Thread Next Thread »
  07-03-2008, 8:22
heegar is not online. Last active: 7/3/2008 1:13:01 PM heegar

Top 500 Posts
Joined on 01-04-2008
Posts 12
twain capability found but not supported!
Reply Quote
I'm working on a scanning program which has worked fine with 3 different scanners but is now acting like a spurned 3 year old.

I'm testing a kodak i660 and we have a test unit for 2 weeks. I'd like to get this solved asap.

This method call:
TwainCapabilityType[] _caps = twainSession.QuerySupportedCapabilities();

returns two specific capabilities that when I try to set them I get an error. One of which I think I really need for image quality. The two capabilities which throw a leadtools.twain.twainexception are:

FeederEnabled
ImageContrast

My image scanned is crappy and I definately need to set the contrast. I don't care about the FeederEnabled for this scanner and can skip that error.

Do you have any experience with a queried capability throwing an error when being set?

Here is my code to set the contrast which has worked for the other 3 scanners.

case TwainCapabilityType.ImageContrast:
availableCapsCount--;

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);

min = Int32.Parse(twCap.RangeCapability.MinimumValue.ToString());
max = Int32.Parse(twCap.RangeCapability.MaximumValue.ToString());
value = (min + max) / 2;

capability = new TwainCapability();
capability.Information.ContainerType = TwainContainerType.OneValue;
capability.Information.Type = TwainCapabilityType.ImageContrast;
capability.OneValueCapability.ItemType = TwainItemType.Fix32;
capability.OneValueCapability.Value = value;
twainSession.SetCapability(capability, TwainSetCapabilityMode.Set);
break;


Thanks,
Adam
   Report 
  07-03-2008, 11:19
Adnan Ismail is not online. Last active: 9/4/2008 2:25:00 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,150
Re: twain capability found but not supported!
Reply Quote
Adam,
Does your scanner driver support setting these capabilities? One way to check is using the Twacker application from the Twain working group?
If you don't have Twacker, you can use the following URL to download it: http://www.twain.org/devfiles/twack.zip

If the Twacker failed, this means that your scanner does not support setting these capabilities.


Adnan Ismail
LEADTOOLS Technical Support

   Report 
  07-03-2008, 12:51
heegar is not online. Last active: 7/3/2008 1:13:01 PM heegar

Top 500 Posts
Joined on 01-04-2008
Posts 12
Re: twain capability found but not supported!
Reply Quote
I need to programmitcally detect the supported capabilities and use them. Twacker won't really help me if the LeadTools is incorrectly identifying capabilities as being supported.

Can you give me some more pertinant help? For instance, is there a bug with Kodak scanners, or is there something wrong with the twain capability class in the leadtools product?



Thanks
adam
   Report 
  07-03-2008, 16:24
GregR is not online. Last active: 8/29/2008 2:25:56 PM GregR



Top 10 Posts
Joined on 05-31-2006
In House
Posts 1,542
Re: twain capability found but not supported!
Reply Quote
I believe you misunderstood the intention of using Twacker.  In general, if a scanner works with Twacker, it should work with LEADTOOLS.  If the scanner has the same problem in Twacker, then the problem lies in the Twain driver and you should contact the manufacturer.

Please try setting those capabilities with Twacker.  If it works with Twacker but not LEADTOOLS, then this is something we'll have to investigate.

Greg Ross
LEADTOOLS Technical Support
   Report 
  07-07-2008, 12:14
heegar is not online. Last active: 7/3/2008 1:13:01 PM heegar

Top 500 Posts
Joined on 01-04-2008
Posts 12
Re: twain capability found but not supported!
Reply Quote
I'm not sure if I'm missing something, but the only settings I can find in twacker is the vendor dialog which does not have an option for brightness or contrast.

is that what you needed, or do I need to do something else?
   Report 
  07-08-2008, 9:36
Adnan Ismail is not online. Last active: 9/4/2008 2:25:00 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,150
Re: twain capability found but not supported!
Reply Quote
After you install the Twacker application, you need to run the Twack_32 utility located in your start menu under this path:
[Start Menu]=>Programs=>TWAIN Toolkit=>Twack_32

If you run the Twacker application, please do as follow:
1. From File menu select "Select Source" and choose the scanner driver you want to use.
2. From the Special Menu, select "Load\Open SM"
3. From the Special Menu, select "Open Source"
4. From the Special Menu, select "Send"

On the Send Dialog, please do as follow:
1. On the Capability combo box, select the "ICAP_CONTRAST" capability
2. After that click on the "Send" button.
3. On the MSG combo box, select the "MSG_SET", doing this will show 4 text boxes at the bottom of the Send dialog
4. Write the values you want to check if your twain driver support setting these value.

Perform this check on the capabilities you want to use in your application. If the Twacker return failure, this means that the Twain driver does not support setting this value, and therefore, LEADTOOLS is not supposed to either.
Adnan Ismail
LEADTOOLS Technical Support

   Report 
  07-09-2008, 11:40
heegar is not online. Last active: 7/3/2008 1:13:01 PM heegar

Top 500 Posts
Joined on 01-04-2008
Posts 12
Re: twain capability found but not supported!
Reply Quote
Thanks for the walkthrough on the twain capabilities, I was not aware of how to do that. The return on ICAP Contrast was that it is not supported and I got an error.
   Report 
  07-10-2008, 10:08
Maen Hasan is not online. Last active: 8/14/2008 8:56:49 AM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,715
Re: twain capability found but not supported!
Reply Quote
Since the Image Contrast capability is not supported when using the Twacker, this means that the limitation lies in the Twain device or its driver.

If you want to perform a similar check in your own program with LEADTOOLS functions (not using Twacker), you can check the TwainSession.QuerySupportedCapabilities method. This method is supposed to work with all Twain drivers, and it gives you a list of capabilities supported by the driver at run time.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » Developer » DotNet » twain capability found but not supported!

Powered by Community Server, by Telligent Systems