Loading...

TwainSetImageLayout and TwainGetImageLayout issue

Support for GdTwain ActiveX and GdTwain Pro ActiveX/SDK.

TwainSetImageLayout and TwainGetImageLayout issue

Postby ctn » Thu Dec 18, 2008 3:51 pm

Dear all

There is either a wrong documentation or implementation at TwainSetImageLayout function.

In gdTwain documentation the following is described:

object Required. An object expression that evaluates to an object in the Applies To list.
nLeft Required. Double. Distance to left edge to scan measured in inches.
nTop Required. Double. Distance to top edge to scan measured in inches.
nRight Required. Double. Distance to right edge to scan measured in inches.
nBottom Required. Double. Distance to bottom edge to scan measured in inches.


but the implementation of this function looks different, because I think nRight and nBottom are in fact nWidth and nHeight.
Could you please investigate?

Thank you
Br,
ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: TwainSetImageLayout and TwainGetImageLayout issue

Postby ctn » Thu Dec 18, 2008 4:07 pm

This is for instace the value I got (A4 paper):

left=0, top=0, right=8.268005, bottom=11.692993

Br,
ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: TwainSetImageLayout and TwainGetImageLayout issue

Postby Loïc » Thu Dec 18, 2008 5:33 pm

Hi,

The doc is correct.

nRight and nBottom are in fact nWidth and nHeight


It is because nLeft = 0 & nTop = 0 in your case. See attached screen.

Best regards,

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

Re: TwainSetImageLayout and TwainGetImageLayout issue

Postby ctn » Fri Dec 19, 2008 9:52 am

But then the de description of the Parameters should be:

object Required. An object expression that evaluates to an object in the Applies To list.
nLeft Required. Double. Distance to left edge to scan measured in inches.
nTop Required. Double. Distance to top edge to scan measured in inches.
nRight Required. Double. Distance to left edge to scan measured in inches.
nBottom Required. Double. Distance to top edge to scan measured in inches.


Thanks for feedback.
ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: TwainSetImageLayout and TwainGetImageLayout issue

Postby Loïc » Mon Dec 22, 2008 4:43 pm

Hi,

I will update the doc to be more clear on this subject.

here the next update:

nLeft Required. Double. Value of the left-most edge of the area to scan measured in inches.
nTop Required. Double. Value of the top-most edge of the area to scan measured in inches.
nRight Required. Double. Value of the right-most edge of the area to scan measured in inches. Note: ImageWidth = nRight - nLeft.
nBottom Required. Double. Value of the bottom-most edge of the area to scan measured in inches. Note: ImageHeight = nBottom - nTop.


Hope this clear now.

Best regards,

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

Re: TwainSetImageLayout and TwainGetImageLayout issue

Postby ctn » Mon Jan 05, 2009 10:29 am

Hi Loïc

Thanks for clarifications.
Br, ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm


Return to GdTwain [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 2 guests