Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scan Problem/Question

Status
Not open for further replies.

lothos12345

Programmer
Mar 8, 2005
40
US
I have created a Visual basic.net application that uses a visioneer 9650 usb scanner. I am using an eztwain class given to me by the supplier to interface this scanner with my application. My problem is when I scan an image in that has been faxed to me the application turns the whole image black or rather inverts it. The white becomes black and black becomes white. And it is doing this automatically. However other images I scan in it scans fine though the other images are not faxed to me. Anyhow an example of the code I am using is pasted below: My problem is that it inverts images when it shouldn't.

Dim fileName As String
fileName = "c:\image.tif"
Call EZTwain.SetHideUI(1)
Call EZTwain.SetIndicators(0)
Call EZTwain.SetFileAppendFlag(0)


If EZTwain.OpenSource("Visioneer 9650 V1.10") <> 0 Then
Call EZTwain.SetPixelType(0)
Call EZTwain.SetBitDepth(1)
Call EZTwain.SetResolution(200)
Call EZTwain.SetXferCount(1)
Call EZTwain.SetAutoScan(0)
Call EZTwain.DIB_SmartThreshold(Me.Handle)
Call EZTwain.AcquireToFilename(Me.Handle, fileName)

End If
If EZTwain.LastErrorCode() <> 0 Then
Call EZTwain.ReportLastError("Unable to scan.")
End If

Any help offered is greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top