Guide for VB.NET
Core Document Formats
Additional Features
Acquire Image to File

VB.NET TWAIN - Save Acquired Image to File

VB.NET TWAIN Image Acquisition Guide for Saving Captured Image to File

Home > .NET Imaging SDK > VB.NET > TWAIN: Acquire and Save Image to File
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

Suppose you have RasterEdge VB.NET TWAIN Image Acquisition on your Windows desktop, and you have completed the TWAIN image scanning and capturing, and how can the acquired image be saved to file path if you want to do more processing of it? Then this tutorial article will show you the exact progress you will take to achieve this goal.
Related .net document control helps: document viewer open source: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS... edit pdf image using c#: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
c# image viewer: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
c# dicom viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET sharepoint document viewer open source: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint
c# text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET edit pdf page using c#: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
  • General understanding of TWAIN knowledge and the class that will be used to save TWAIN scanned image
  • The comprehensive and precise codes examples on how to acquire TWAIN captured image to file within VB.NET program
  • .NET TWAIN acquisition SDK features explanations
  • More relevant VB.NET TWAIN acquisition and object device guides
TWAIN Image Saving
As what can be searched, TWAIN is the standard interface access for Windows desktop library that lets you acquire images from scanners, cameras and other devices to communicate with image processing software. With a professional and reliable TWAIN application, like RasterEdge .NET TWAIN SDK for VB.NET, spare-time end users and technical VB developers can start and complete TWAIN image acquisition.
By working with the TWAIN Acquisition object, VB.NET TWAIN scanning and capturing program containing a collection of Device objects controls numerous properties used for the image acquisition for greater control over the acquiring process, like "ImageAcquired" on starting scanning image, "AcquireFinished" occurring when image capturing finished and "AcquireCanceled" for suspending TWAIN acquisition.
In addition, if you still want to further work with a TWAIN scanned image in a different application, you had to save the image to disk first, then open the application of your device and re-open the image there. Then the event handler - "FileTranfer" will be used to help you to acquire and store captured image to file in VB.NET. By the way, users also are competent to set and customize the saving file path with the most robust RasterEdge TWAIN acquisition tool in VB.NET class.
Sample Codes
In order to apply our TWAIN acquisition application better, there are two things need to be done before you can run the TWAIN image saving program within your Visual Basic platform. That is, you need to activate the evaluation or product license key as well as integrate "RasterEdge.Imaging.Basic.dll" & "RasterEdge.Imaging.TWAIN.dll" assemblies.

Code on Saving TWAIN Acquired Image

Sample code below in VB.NET class is offered to help users save the TWAIN scanned and acquired image to file. Image can be saved to file in BMP, JPG, PNG, GIF, TIFF or PDF format.
Public Sub AquireToFile()
Dim acq As New Acquisition()

Dim device As Device = acq.ShowSelectSource()
' Find out if tiff is supported
Dim formats As TwainImageFormat() = device.GetSupportedImageFormats

For Each format As TwainImageFormat In formats
If format = TwainImageFormat.Tiff Then
' TIFF is supported, so set the FileFormat.
device.FileFormat = format
' Now lets try to use Group4 or Group3 compression.
' We could use GetSupportedCompressionModes, but we
' will simply try setting the Compression property instead.
device.Compression = TwainCompressionMode.Group4
If device.Compression <> TwainCompressionMode.Group4 Then
device.Compression = TwainCompressionMode.Group3
End If
Exit For
End If

acq.FileTranfer += New EventHandler(OnFileTransfer)
End Sub

Code on Setting File Path

Besides the powerful support on saving acquired TWAIN image into variable image and document files in VB.NET, this TWAIN acquisition component still enables users to define and set the image saving file path with a specified file name.
''' <summary>
''' Set the file path to store the image acquired.
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Public Sub OnFileTransfer(sender As Object, e As FileTransferEventArgs)
e.FileName = "C:\ScanningImage\newImage.tif"
End Sub
TWAIN Control
Our TWAIN acquisition control for VB.NET program developing can be installed and activated on any TWAIN-compliant image processing application. With zero-needs to users, even you know little about TWAIN, you can apply it to complete the TWAIN image acquisition with great success.

Programming Environments-friendly

This .NET TWAIN image acquisition application can be implemented within any .NET application within Visual Studio versions 2005, 2008, 2010 and 2012.

Support 32-bit and 64-bit TWAIN Binaries

RasterEdge TWAIN acquisition library for VB.NET is compatible with Internet Explorer (32-bit and 64-bit) on Windows, as well as Firefox and Chrome.

Comprehensive TWAIN Acquisition Object

As long as you use TWAIN Acquisition object, VB.NET image scanning and capturing program is completely under control as you can choose to cancel or finish image acquiring at any time.

TWAIN Device Control

Quickly and easily get Device object from acquisition to control the whole image scanning process within any .NET project in C#, VB.NET, ASP.NET or .NET WinForms.

Recommend this to Google+ is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster