ByteScout Barcode Reader SDK - VB.NET - Decode Damaged QR Code - ByteScout

ByteScout Barcode Reader SDK – VB.NET – Decode Damaged QR Code

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – VB.NET – Decode Damaged QR Code

How to decode damaged QR code in VB.NET using ByteScout BarCode Reader SDK

This code in VB.NET shows how to decode damaged QR code with this how to tutorial

The sample shows steps and algorithm of how to decode damaged QR code and how to make it work in your VB.NET application. What is ByteScout BarCode Reader SDK? It is the SDK for barcode decoding. Can read all popular types from Code 128, GS1, UPC and Code 39 to QR Code, Datamatrix, PDF417. Images, pdf, TIF images and live web camera are supported as input. Designed to handle documents with noise and defects. Includes optional splitter and merger for pdf and tiff based on barcodes. Batch mode is optimized for high performance with multiple threads. Decoded values can be exported to XML, JSON, CSV or into custom data format. It can help you to decode damaged QR code in your VB.NET application.

This code snippet below for ByteScout BarCode Reader SDK works best when you need to quickly decode damaged QR code in your VB.NET application. In order to implement the functionality, you should copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. You can use these VB.NET sample examples in one or many applications.

You can download free trial version of ByteScout BarCode Reader SDK from our website to see and try many others source code samples for VB.NET.

Try it today: Get 60 Day Free Trial or sign up for Web API

DecodeDamagedQRCode.sln
      
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27703.2026 MinimumVisualStudioVersion = 10.0.40219.1 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DecodeDamagedQRCode", "DecodeDamagedQRCode.vbproj", "{CD0D99A1-96B9-4A05-AE33-71A5F816D282}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {CD0D99A1-96B9-4A05-AE33-71A5F816D282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CD0D99A1-96B9-4A05-AE33-71A5F816D282}.Debug|Any CPU.Build.0 = Debug|Any CPU {CD0D99A1-96B9-4A05-AE33-71A5F816D282}.Release|Any CPU.ActiveCfg = Release|Any CPU {CD0D99A1-96B9-4A05-AE33-71A5F816D282}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C7A3FAEC-E77D-46C3-8F22-0F76C2FBC484} EndGlobalSection EndGlobal

Try it today: Get 60 Day Free Trial or sign up for Web API

DecodeDamagedQRCode.vbproj
      
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{CD0D99A1-96B9-4A05-AE33-71A5F816D282}</ProjectGuid> <OutputType>Exe</OutputType> <StartupObject>DecodeDamagedQRCode.Program</StartupObject> <RootNamespace>DecodeDamagedQRCode</RootNamespace> <AssemblyName>DecodeDamagedQRCode</AssemblyName> <FileAlignment>512</FileAlignment> <MyType>Console</MyType> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup> <OptionExplicit>On</OptionExplicit> </PropertyGroup> <PropertyGroup> <OptionCompare>Binary</OptionCompare> </PropertyGroup> <PropertyGroup> <OptionStrict>Off</OptionStrict> </PropertyGroup> <PropertyGroup> <OptionInfer>On</OptionInfer> </PropertyGroup> <ItemGroup> <Reference Include="Bytescout.BarCodeReader, Version=10.2.0.1799, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>c:\Program Files\Bytescout BarCode Reader SDK\net2.00\Bytescout.BarCodeReader.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Import Include="System.Collections" /> <Import Include="System.Collections.Generic" /> <Import Include="System.Data" /> <Import Include="System.Diagnostics" /> </ItemGroup> <ItemGroup> <Compile Include="Program.vb" /> </ItemGroup> <ItemGroup> <Content Include="corrupted_barcode_qrcode.png"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

Program.vb
      
Imports Bytescout.BarCodeReader Module Program Sub Main() Try 'Read Barcode Process Dim reader As Reader = New Reader() reader.RegistrationKey = "demo" reader.RegistrationName = "demo" ' Set Barcode type to find reader.BarcodeTypesToFind.QRCode = True ' ----------------------------------------------------------------------- ' NOTE: We can read barcodes from specific page to increase performance . ' For sample please refer to "Decoding barcodes from PDF by pages" program. ' ----------------------------------------------------------------------- ' Read barcodes Dim barcodes() As FoundBarcode = reader.ReadFrom("corrupted_barcode_qrcode.png") For Each code As FoundBarcode In barcodes Console.WriteLine("Found barcode with type '{0}' and value '{1}'", code.Type, code.Value) Next Catch ex As Exception Console.WriteLine(ex.Message) End Try Console.WriteLine("Press any key to exit...") Console.ReadLine() End Sub End Module

Try it today: Get 60 Day Free Trial or sign up for Web API

MORE INFORMATION

Get 60 Day Free Trial or Visit ByteScout BarCode Reader SDK page

Explore ByteScout BarCode Reader SDK documentation

WEB API VERSION

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next