Unable to Set x,y resolution using twain_32

Jan 3, 2009 at 12:42 PM
Hi, Please Solve my problem.

I am using Microsoft twain_32 dll functions to set x and y resolution for scanner(eg.200dpi,300dpi etc.,).

But i got the output image with the resolution of 96dpi (shown by windows properties dialog and microsoft picture manager).

I am also set the units before set the resolution.

I am using the following code to set resolution.

-----For Units----


Function SetUnits(ByVal value As String) As Boolean




Dim cap_units As Enumerations.Capability = Enumerations.Capability.Icap_Units



Dim capxrcnt As New DataStructures.twCapability(cap_units, Enumerations.Units.Pixels, Enumerations.Containers.twOneValue )



Dim retBool As Boolean = OperationTriplets.Control.Capability.Set(capxrcnt)



End Function



---------For X Resolution----


Public Function SetScannerXResolution(ByVal Value As String) As String



intValue As Integer = CInt(Value)



Dim cap_XResCount As Enumerations.Capability = Enumerations.Capability.Icap_XResolution



Dim XResCountOneval As New DataStructures.twOneValue


XResCountOneval.ItemType = DataStructures.twCapability.CapType(cap_XResCount)

XResCountOneval.Item = intValue


Dim capXResCount1 As New DataStructures.twCapability(cap_XResCount, XResCountOneval)



Dim retBool As Boolean = OperationTriplets.Control.Capability.Set(capXResCount1)



End Function



-----For Y Resolution----


Function SetScannerYResolution(ByVal Value As String) As Boolean



Dim intValue As Integer = CInt(Value)



Dim cap_YResCount As Enumerations.Capability = Enumerations.Capability.Icap_YResolution



Dim YResCountOneval As New DataStructures.twOneValue


YResCountOneval.ItemType = DataStructures.twCapability.CapType(cap_YResCount)

YResCountOneval.Item = intValue


Dim capYResCount1 As New DataStructures.twCapability(cap_YResCount, YResCountOneval)





Dim retBool As Boolean = OperationTriplets.Control.Capability.Set(capYResCount1)



 Return retBool



End Function


I got return type true for all properties,but the changes are not into effect.

I request you to check out my issue and let me know how can i proceed further.


Jan 3, 2009 at 1:06 PM
Please Any one help me as soon as posible.

Unlimited freedom, unlimited storage. Get it now