Support Center

Get Current Resolution

Ray Hughes Oct 01, 2015 11:23AM EDT

How do I go about getting the current resolution set on the scanner using the Imageman Twain control. I've tried the getCapability but this returns an enumeration which seems to hold all available values. I'm just looking for the current value in use which I can see through the scanner profiles in windows. Thanks.

2 Data Techniques Responses and 1 Community Responses

Up 1 Rated Down
DTI Support  Data Techniques Employee Oct 01, 2015 12:01PM EDT

Hi,

Actually the GetCapabilioty is the proper approach, you'll find a Default field in the Enumeration that's returned that contains he default value for the resolution.

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

Up 0 Rated Down
Ray Hughes  Data Techniques Employee Oct 05, 2015 10:47AM EDT

Thanks for the prompt response Sean. Unfortunately when I try the enumeration comes back with a default value of 0. Is this normal? I'm doing the following:

Dim capabilityValue As Object = Nothing
Dim dataType As DTI.ImageMan.Twain.DataType
Dim retVal As Boolean


dataType = New DTI.ImageMan.Twain.DataType()
retVal = Me.Twain.GetCapability(DTI.ImageMan.Twain.Capabilities.XResolution, capabilityValue, dataType)
If retVal Then
MessageBox.Show(CType(capabilityValue, DTI.ImageMan.Twain.Enumeration).Default.ToString())
End If

Up 0 Rated Down
DTI Support  Data Techniques Employee Oct 05, 2015 10:48AM EDT

Hi,

If retval == true then the call is working, some scanners may have have a true default for resolution.

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

This question is closed to new answers.

Contact Us