QR Code Image Sample - pqScan.com
.NET Barcode Reader SDK Building up Perfect Quality Barcode Reading Software for .NET Online Demo Download Trial Purchase Now
.NET
C# & VB.NET

QR Code Reading in C# & VB.NET

back to home  >  .NET Barcode Reader SDK  >  Recognize Barcodes in .NET  >  Scan QR Code Using C# & VB.NET

This is a tutorial page for how to scan QR Code barcodes from image files in C#.NET, VB.NET or C++ programming environment. If you are searching for a professional barcode scanner sdk for your .NET application; if you ask for demo code for reading QR Code barcodes in C# or VB.NET class library; if you want to accelerate barcode reading speed in Visual Studio .NET program, this page will fulfill all your needs.

Profession SDK for Scanning QR Code

Let's start with what can you do with our professional barcode scanning dll for .NET.

  • Enable C# and VB.NET programming users to read QR Code symbol from raster bmp, jpeg, jpg, png, tif, tiff, and gif image formats. And the encoded barcode type and data value will be returned in array form. If your image contains other barcode types, our .NET barcode reader control can also read and return their values as well.
  • Provide APIs for reading all QR Code bar codes font from an image file at a time. Also, you can save reading time by defining QR Code as target barcode type. Then, our barcode scanner dll for C# and VB.NET will not read other barcode types on your image (if it has).
  • Read QR Code barcodes that are rotated on your image (0, 90, 180, or 270 degrees). And your QR Code bar code, even having no quiet zone, will be accurately recognized in Visual C# and Visual Basic .NET programs. Note: according to ISO/IEC specification, for better scanning effect, 2D QR Code should always have a quiet zone on four sides of its barcode symbol.

C# & VB.NET Demos for Reading QR Code

As stated in .NET guide page for barcode reading, there are six barcode reading methods that can be used in VB.NET and C# applications, which allows you to recognize certain barcode type (2d QR Code) or total barcode types from image source. And your target raster image source can be in Bitmap object, disk file, or stream mode. Here we supply free C# and VB.NET demo solution for scanning and decoding QR Code from file at the disk, please see as below.

How to Read QR Code Using C# Demo

public void ScanQRCodeFromFile(string filename)
{
  // Choose to detect and read QR Code barcode(s) only from a local image file.
  BarcodeResult[] results = BarCodeScanner.Scan(filename, BarCodeType.QRCode);

  // APIs for reading 2D QR Code from Bitmap and Stream objects.
  // public static BarcodeResult[] Scan(Bitmap bitmap, BarCodeType barType);
  // public static BarcodeResult[] Scan(Stream stream, BarCodeType barType);

  foreach (BarcodeResult result in results)
  {
    Console.WriteLine(result.BarType.ToString() + "-" + result.Data);
  }
}

How to Read QR Code Using VB.NET Demo

Public Sub ScanAllFromFile(ByVal filename As String)
  ' Choose to recognize all barcode types including QR Code from a local image file.
  Dim results() As BarcodeResult = BarCodeScanner.Scan(filename) 

  ' APIs for decoding all barcode types from Bitmap and Stream objects.
  ' public static BarcodeResult[] Scan(Bitmap bitmap)
  ' public static BarcodeResult[] Scan(Stream stream)

  Dim result As BarcodeResult
  For Each result In results
    Console.WriteLine(result.BarType.ToString() + "-" + result.Data)
  Next
End Sub

If you have any other barcode reading questions for our .NET Barcode Scanner SDK, please send an email to us. We are pleased to help you.

pqScan SDK
.NET Barcode Reader Software
Online Guide
Barcode Reading for .NET Barcode Reading Using C# Barcode Reading Using VB
Barcode Type
Use C#/VB to Scan PDF-417 Use C#/VB to Scan Data Matrix Use C#/VB to Scan Aztec Code Use C#/VB to Scan Code 128 Use C#/VB to Scan Code 39 Use C#/VB to Scan EAN-13 Use C#/VB to Scan EAN-8 Use C#/VB to Scan UPC-A Use C#/VB to Scan UPC-E Use C#/VB to Scan Code 93 Use C#/VB to Scan Codabar Use C#/VB to Scan ITF-14 View All Barcodes >>
Really appreciate your .NET SDK for barcode recognition. It is well integrated into my project, providing all functions I need. Overall, I am very happy to choose your product. Tom Allum