LEADTOOLS Support
General
General Questions
Presetting an image size prior to acquiring an image using twain
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, February 13, 2006 7:58:06 AM(UTC)
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
#2
Posted
:
Wednesday, February 15, 2006 4:58:34 AM(UTC)
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.
LEADTOOLS Support
General
General Questions
Presetting an image size prior to acquiring an image using twain
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.