I'm working with Microsoft's Windows Image Acquisition Library v2.0 in a vb.net project.
I've been able to successfully scan and save that scan to a jpg. But rather than saving it to a file, I would like to move it to a bitmap object and display the bitmap object in a picturebox control.
Below is the code I'm currently using to scan and save. Any ideas?
Thanks in advance,
Sheldon
---
Private Sub btnScan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnScan.Click
Dim wiaDialog As New WIA.CommonDialog
Dim wiaImageFile As New WIA.ImageFile
Dim strFileName as string
wiaImageFile = wiaDialog.ShowAcquireImage()
strFileName = "C:\Test.jpg"
wiaImageFile.SaveFile(strFileName)
End Sub
I've been able to successfully scan and save that scan to a jpg. But rather than saving it to a file, I would like to move it to a bitmap object and display the bitmap object in a picturebox control.
Below is the code I'm currently using to scan and save. Any ideas?
Thanks in advance,
Sheldon
---
Private Sub btnScan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnScan.Click
Dim wiaDialog As New WIA.CommonDialog
Dim wiaImageFile As New WIA.ImageFile
Dim strFileName as string
wiaImageFile = wiaDialog.ShowAcquireImage()
strFileName = "C:\Test.jpg"
wiaImageFile.SaveFile(strFileName)
End Sub