ByteScout Barcode Reader SDK - VB.NET - Acquire Image From Scanner And Decode - ByteScout

ByteScout Barcode Reader SDK – VB.NET – Acquire Image From Scanner And Decode

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – VB.NET – Acquire Image From Scanner And Decode

How to acquire image from scanner and decode in VB.NET with ByteScout BarCode Reader SDK

This code in VB.NET shows how to acquire image from scanner and decode with this how to tutorial

Acquire image from scanner and decode is easy to implement in VB.NET if you use these source codes below. Want to acquire image from scanner and decode in your VB.NET app? ByteScout BarCode Reader SDK is designed for it. ByteScout BarCode Reader SDK is the SDK for reading of barcodes from PDF, images and live camera or video. Almost every common type like Code 39, Code 128, GS1, UPC, QR Code, Datamatrix, PDF417 and many others are supported. Supports noisy and defective images and docs. Includes optional documents splitter and merger for pdf and tiff based on found barcodess. Batch mode is supported for superior performance using multiple threads. Decoded values are easily exported to JSON, CSV, XML and to custom format.

You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout BarCode Reader SDK for acquire image from scanner and decode below and use it in your application. In your VB.NET project or application you may simply copy & paste the code and then run your app! Detailed tutorials and documentation are available along with installed ByteScout BarCode Reader SDK if you’d like to dive deeper into the topic and the details of the API.

Our website provides trial version of ByteScout BarCode Reader SDK for free. It also includes documentation and source code samples.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.vb
      
Imports System.Text Imports System.Windows.Forms Imports Bytescout.BarCodeReader ' This example demonstrates camera image acquiring using Windows Image Acquisition (WIA) interface. ' BarCode Reader SDK has builtin WIAImageScanner class for WIA. ' If you experienced issues with this example, please try another example located in /Visual Basic.NET/Read From Live Video Cam/ NotInheritable Class Program Private Sub New() End Sub Friend Shared Sub Main() ' Use WIAImageScanner image acquisition module Dim wiaScanner As WIAImageScanner = New WIAImageScanner wiaScanner.OutputFileNameTemplate = "BarCodeReader-scanned" wiaScanner.OutputImageFormat = WiaImageFormatType.PNG wiaScanner.ImageQuality = WiaImageBias.MaximizeQuality wiaScanner.ImageIntent = WiaImageIntent.UnspecifiedIntent wiaScanner.ShowDeviceSelectionDialog = True Try ' Run Acquire and exit if canceled or zero images If Not wiaScanner.Acquire() Then Return End If Catch Ex As Exception Dim message As String = Ex.Message If Ex.InnerException IsNot Nothing Then message = message & Environment.NewLine & Ex.InnerException.Message End If MessageBox.Show("Failed acquiring images:" & Environment.NewLine & Environment.NewLine & message) Return End Try ' Read barcode: Dim barcodeReader As New Reader() barcodeReader.RegistrationName = "demo" barcodeReader.RegistrationKey = "demo" ' Enable decoding of ALL known barcode types. barcodeReader.BarcodeTypesToFind.All = True ' To speed up the processing and avoid false positives select specific barcodes type, ' e.g. barcodeReader.BarcodeTypesToFind.PDF417 = True ' ----------------------------------------------------------------------- ' NOTE: We can read barcodes from specific page to increase performance . ' For sample please refer to "Decoding barcodes from PDF by pages" program. ' ----------------------------------------------------------------------- Dim barcodes As FoundBarcode() = barcodeReader.ReadFrom(wiaScanner.OutputFiles(0)) If barcodes.Length > 0 Then Dim builder As New StringBuilder() For Each barcode As FoundBarcode In barcodes builder.AppendLine(String.Format("Found barcode of type '{0}' with value '{1}'", barcode.Type, barcode.Value)) Next MessageBox.Show(builder.ToString()) Else MessageBox.Show(wiaScanner.OutputFiles(0) & Environment.NewLine & "Could not find any barcode.") End If ' Cleanup barcodeReader.Dispose() End Sub End Class

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page

Explore ByteScout BarCode Reader SDK Documentation

Explore Samples

Sign Up for ByteScout BarCode Reader SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page

Explore ByteScout BarCode Reader SDK Documentation

Explore Samples

Sign Up for ByteScout BarCode Reader SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next