This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, November 1, 2010 10:50:00 PM(UTC)
Groups: Registered
Posts: 6
I am using Lead Tool version 16.
I try to set the scan quality (200dpi) with the in VB6 code below and it hit "Invalid Capability Value". I have checked that it supports the ICAP_XRESOLUTION and ICAP_YRESOLUTION.
Is there any of the value is wrongly set?
Set twCap = New TwainCapability
twCap.Information.ContainerType = TwainContainerType_OneValue
twCap.Information.Type = TwainCapabilityType_ImageYResolution
twCap.OneValueCapability.itemType = TwainItemType_Fix32
twCap.OneValueCapability.Value.IntegerValue = 200
Call MyTwainSession.SetCapability(twCap, TwainSetCapabilityMode_Set)
twCap.Information.Type = TwainCapabilityType_ImageXResolution
twCap.OneValueCapability.itemType = TwainItemType_Fix32
twCap.OneValueCapability.Value.IntegerValue = 200
Call MyTwainSession.SetCapability(twCap, TwainSetCapabilityMode_Set)
tthon attached the following image(s):
#2
Posted
:
Tuesday, November 2, 2010 6:38:50 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Use the following code to set the X resolution and Y resolution values:
'================
Dim twCap As TwainCapability
Dim data As New TwainItemValue
Set twCap = New TwainCapability
data.itemType = TwainItemType_Fix32
data.FloatValue = 200
twCap.Information.ContainerType = TwainContainerType.TwainContainerType_OneValue
twCap.Information.Type = TwainCapabilityType_ImageYResolution
twCap.OneValueCapability.itemType = TwainItemType_Fix32
Set twCap.OneValueCapability.Value = data
twnSession.SetCapability twCap, TwainSetCapabilityMode_Set
twCap.Information.Type = TwainCapabilityType_ImageXResolution
Set twCap.OneValueCapability.Value = data
twnSession.SetCapability twCap, TwainSetCapabilityMode_Set
'================
If you face the same error, try to use the Twain device using the standard Twain test utility from the Twain Working Group. This program is called Twacker and you can get it from here:
http://www.twain.org/devfiles/twack.zipUse the Twacker to get the supported DPI values by the device and see if it supports 200.
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.