Page 1 of 1

BrightnessMinValue / AutoBright problems

Posted: Fri Aug 06, 2010 2:19 am
by kossman
I am developing a scanning application in VB.Net and most functions are working fine when connected to the scanner, but I have problems with the following propertys of the Vintasoft.Twain.VSTwain object:

* BrightnessMaxValue
* BrightnessMinValue
* ContrastMaxValue
* ContrastMinValue
* AutoBright

For the max and min values, a watch of the the VSTwain object shows them as {"Unable to cast object of type 'Vintasoft.Twain.Fix32' to type '.9'."}

The AutoBright shows {"Error to get capability value."} and causes an error when running the TwainAdvanced example and getting capabilities for the scanner.

I can manually get the max and min values by using 'GetCap' function and getting the values myself from the CapItems array, but it would be easier if I could use the existing properties.

Is this a known problem, or is there something I need to do first to populate these values? None of the other properties show any problems, only the 5 above.

I'm using Visual Basic 2008 Express edition and the scanner is a Canon ImageFormula DR-2010C

Re: BrightnessMinValue / AutoBright problems

Posted: Tue Aug 10, 2010 3:38 pm
by Alex
Hello,

Sorry for a delay. Today version 7.0 of VintaSoftTwain.NET SDK was released. Please try to use this version and let me know if you will have any problems or questions.

Best regards, Alexander

Re: BrightnessMinValue / AutoBright problems

Posted: Wed Aug 11, 2010 8:49 am
by kossman
Thanks Alex for the reply and the update to version 7.0. I do like some of the changes to the structures which I find to be more logical and easier to use.

With regards to my previous problem, I still have some issues with the Autobright property of the 'Device' object. The BrightnessMinValue, BrightnessMaxValue and contrast min and max have been removed so these are no longer 'not working' so to speak and I'll continue to get them from the capability range array. Could be something to add to the wishlist for version 7.1 though!

For the AutoBright property I can say the following:

* The capability is supported by the scanner, using ICAP_AUTOBRIGHT.
* Accessing the current value of the capability fails either by trying to access by the Autobright property and also by using DeviceCapability.GetValue function. Message is {"Cannot get value of capability"}
* Accessing the current value using DeviceCapability.GetValues works OK
* Trying to set the value using DeviceCapability.SetValue doesn't work {"Cannot set value of capability"}
* I've tried updating the TWAIN driver from 1.9 to 2.0 and it didn't help.

It's interesting that it works using DeviceCapability.GetValues, so I'm half-way around it, but still have a problem with SetValue and GetValue should also work anyway I suppose.

Re: BrightnessMinValue / AutoBright problems

Posted: Wed Aug 11, 2010 11:43 am
by Alex
Hello Colin,
Accessing the current value of the capability fails either by trying to access by the Autobright property and also by using DeviceCapability.GetValue function. Message is {"Cannot get value of capability"}
We have fixed the problem with Device.AutoBright property and DeviceCapability.GetValue method in version 7.0.0.3.
Trying to set the value using DeviceCapability.SetValue doesn't work {"Cannot set value of capability"}
I think device does not allow to change value of the capability.

Best regards, Alexander

Re: BrightnessMinValue / AutoBright problems

Posted: Wed Aug 11, 2010 11:46 pm
by kossman
I think device does not allow to change value of the capability.
Yes you could be right. I thought it was working in an older version of VSTWAIN but in fact the value of AutoBright wasn't actually changing, and the scanner dialog box for the scanner doesn't include auto-brightness so it may not be available.

Thanks Alex.