Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, February 13, 2006 7:58:06 AM(UTC)

AlPrice  
AlPrice

Groups: Registered
Posts: 3


I would like to preset the size of the image being scanned by my application - not a user interface (set TwainUserInterfaceFlags.None).

For instance set the height to 2.25" and set the width  to 4"

this way the image will be precropped.

 

any ideas?

 

Thank Al

 

 

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, February 15, 2006 4:58:34 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

Al,
It seems you are using LEADTOOLS.NET 14.

If that's the case, the following code, adapted from the help topic for the TwainFrame.RightMargin Property, should do what you want:

_twainSession.SelectSource()
Dim twFrm As Leadtools.Twain.TwainFrame = New TwainFrame
Dim twCap As Leadtools.Twain.TwainCapability = New TwainCapability

twFrm.LeftMargin = 0
twFrm.RightMargin = 4
twFrm.TopMargin = 0
twFrm.BottomMargin = 2.25

twCap.Information.ContainerType = Leadtools.Twain.TwainContainerType.OneValue
twCap.Information.Type = Leadtools.Twain.TwainCapabilityType.ImageFrames
twCap.OneValue.ItemType = Leadtools.Twain.TwainItemType.Frame
twCap.OneValue.Value = twFrm

_twainSession.SetCapability(twCap, TwainSetCapabilityMode.Set)
_twainSession.MaxPagesNumber = 1
_twainSession.Acquire(TwainUserInterfaceFlags.None)

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.045 seconds.