Loading...

TwainSetCapCurrentNumeric parameters differ from Get call.

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

TwainSetCapCurrentNumeric parameters differ from Get call.

Postby justcode » Wed May 04, 2011 5:07 pm

I need to save and restore scanner settings using the TWAIN calls supported by the control.

The call TwainGetCapCurrentNumeric() returns a double value, I assume that I can retrieve TW_FIX32 values with this call. However, the companion call, TwainSetCapCurrentNumeric() takes a long as a parameter, thus only being able to pass a whole number. If I read the value '1.5' from a TW_FIX32 tag, how do I set it?

Am I missing something?
Paul R. Rondeau
Sr. Software Engineer
MultiProcess Computer Corporation
User avatar
justcode
 
Posts: 24
Joined: Wed Jul 15, 2009 9:20 pm

Re: TwainSetCapCurrentNumeric parameters differ from Get cal

Postby Loïc » Wed May 04, 2011 5:45 pm

Hi Paul,

Well see. The nNewValue parameter should accept Double values.
For the next release I will add a TwainSetCapCurrentNumericEx function taking a Double as parameter.

You don't have to take care of the fix32 transformation, the function do it itself for TW_FIX32 values.

I will try to release the new version in a couple of days.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: TwainSetCapCurrentNumeric parameters differ from Get cal

Postby justcode » Thu May 05, 2011 4:26 pm

You may want to take a closer look at the fix32 transformation code, I am getting some erroneous values from TwainGetCapCurrentNumeric for TW_FIX32 values. (Fujitsu M3091DC scanner)

ICAP_BRIGHTNESS is supposed to be a range -1000 to +1000 and when I get the current value, it is: 3400.000
ICAP_CONTRAST is supposed to be a range -1000 to +1000 and when I get the current value, it is: 30456.000.

Thanks,
Paul R. Rondeau
Sr. Software Engineer
MultiProcess Computer Corporation
User avatar
justcode
 
Posts: 24
Joined: Wed Jul 15, 2009 9:20 pm

Re: TwainSetCapCurrentNumeric parameters differ from Get cal

Postby Loïc » Thu May 05, 2011 4:54 pm

Our cast is correct,
I guess your scanner is not 100% twain compliant.

You can check calling TwainGetCurrentBrightness or using another tool such as twack_32 that can be downloaded from here: http://www.twain.org/
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: TwainSetCapCurrentNumeric parameters differ from Get cal

Postby justcode » Thu May 05, 2011 5:07 pm

You are correct, I ran the Twister app on the scanner which tests the scanners capabilities and it returned the same values you did for those tags. Apparently they are invalid when the scanner driver is loaded.

Twister is a TWAIN device analyzer - It is particularly good at detecting and analyzing capabilities - TWAIN device settings. It be downloaded here: http://www.eztwain.com/twister.htm

I use it to test all the capabilities of scanners in the field, when we have issues and forgot to run it on this model scanner before posting the last message.... sorry.
Paul R. Rondeau
Sr. Software Engineer
MultiProcess Computer Corporation
User avatar
justcode
 
Posts: 24
Joined: Wed Jul 15, 2009 9:20 pm

Re: TwainSetCapCurrentNumeric parameters differ from Get cal

Postby justcode » Wed May 11, 2011 2:03 pm

Will the change to the TwainSetCapCurrentNumeric call be released soon?
I would like to have it in our next release and I'm close to completion.

I also found another cool app to test troublesome twain scanners called Twirl TWAIN Probe.
It provides full interactive control of the TWAIN API, making it easy to explore the capabilities of a device and to experiment with operations.
You can get it here: http://www.eztwain.com/twirl.htm

Thanks,
Paul R. Rondeau
Sr. Software Engineer
MultiProcess Computer Corporation
User avatar
justcode
 
Posts: 24
Joined: Wed Jul 15, 2009 9:20 pm

Re: TwainSetCapCurrentNumeric parameters differ from Get cal

Postby Loïc » Wed May 11, 2011 4:20 pm

Hi Paul,

We are still doing some tests of validation. i think all will be done within 24 hours.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest