Code 128 Image Sample -
.NET Barcode Reader SDK Building up Perfect Quality Barcode Reading Software for .NET Online Demo Download Trial Purchase Now

Aztec Code C# & VB.NET Reading

back to home  >  .NET Barcode Reader SDK  >  Recognize Barcodes in .NET  >  Aztec Code C# & VB.NET Reading Guide

Aztec Code is a main two-dimensional barcode type supported by pqScan Barcode Scanning Library for .NET, C#, VB.NET. Like reading QR Code in C# & VB.NET, Aztec Code barcode recognition from image file is also very easy to implement. This online tutorial will explain how to achieve fast bar code scanning in detail. BTW, besides 2D barcodes Aztec Code and QR Code, our barcode reading library for .NET also supports Data Matrix and PDF-417 bar codes decoding.

Please pay attention, if you are evaluating free .NET Barcode Scanner trial DLL in Visual C# or Visual Basic .NET application, the first decoded data of Aztec Code symbol will be a random character. This is the only difference between trial DLL and licensed DLL.

How to: Read Aztec Code in C# & VB

It's very simple to implement fast Aztec Code 2D barcode reading in C# and VB.NET programming projects. No additional barcode software or plug-ins should be used. As long as integrating PQScan.BarcodeScanner.dll into .NET project, you are capable of scanning and reading Aztec Code barcode from image files like Gif, Jpeg/Jpg, Bmp, Tiff/Tif, and Png. All these raster image file formats can be loaded into C# and VB.NET programs in the forms of string, stream and bitmap. Now, let's see free online demos for Aztec Code recognition as below.

How to: Using Free C# Demo

Firstly, we give all APIs that can be used for C# Aztec Code barcode decoding. As you see, there three types of C#.NET API. One is for reading all barcode symbologies from image file. The second is for reading only Aztec Code barcode symbology from image source. The last is for image that has only one barcode on it and this will help to improve recognition accuracy. By using any of them, you will get recognition result in an array of barcode information (both barcode type and data).

public static BarcodeResult[] Scan(Bitmap bitmap);
public static BarcodeResult[] Scan(Stream stream);
public static BarcodeResult[] Scan(string filename);

public static BarcodeResult[] Scan(Bitmap bitmap, BarCodeType barType);
public static BarcodeResult[] Scan(Stream stream, BarCodeType barType);
public static BarcodeResult[] Scan(string filename, BarCodeType barType);

public static BarcodeResult ScanSingle(Bitmap bitmap);
public static BarcodeResult ScanSingle(Stream stream);
public static BarcodeResult ScanSingle(string filename);

Then, Visual C#.NET demo code for scanning Aztec Code barcode from image (string) is illustrated. Here, we use a specific API to customize barcode type as Aztec Code.

public void ScanAztecFromFile(string filename)
  // Customize to read only Aztec Code from image file in C# application.
  BarcodeResult[] results = BarCodeScanner.Scan(filename, BarCodeType.Aztec);

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

To improve barcode recognition accuracy, you can use the following C# sample code when there's only one Aztec Code on your image.

Bitmap bmp = new Bitmap("YourImagePath");
BarcodeResult barcode = BarCodeScanner.ScanSingle(bmp);
Console.WriteLine("barcode data:{0}.", barcode.Data);

How to: Using Free VB.NET Demo

If you need to detect and decode Aztec Code from image file using VB.NET programming, then have a try with the following free demo code. This Visual Basic demo code explains how to read all Aztec Code barcodes as well as other barcode symbologies from loaded image file.

Public Sub ScanAllFromFile(ByVal filename As String)
  ' Customize to scan all barcode symbols from image file in C# application.
  Dim results() As BarcodeResult = BarCodeScanner.Scan(filename)

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

If your image only includes one Aztec Code, you may use the following VB.NET sample code to improve barcode reading accuracy.

Dim bmp As Bitmap = New Bitmap("YourImagePath") 
Dim barcode As BarcodeResult = BarCodeScanner.ScanSingle(bmp) 
Console.WriteLine("barcode data:{0}.", barcode.Data)

See also: Online C# Guide for Barcode Decoding, Online VB.NET Guide for Barcode Decoding.

pqScan SDK
Barcode Scanner Lib for .NET
Online Guide
.NET 1D & 2D Barcode Scanning C# 1D & 2D Barcode Scanning VB 1D & 2D Barcode Scanning
Barcode Type
C#/VB Reading: 2D QR Code C#/VB Reading: 2D PDF-417 C#/VB Reading: 2D Data Matrix C#/VB Reading: 1D Code 128 C#/VB Reading: 1D Code 39 C#/VB Reading: 1D EAN-13 C#/VB Reading: 1D EAN-8 C#/VB Reading: 1D UPC-A C#/VB Reading: 1D UPC-E C#/VB Reading: 1D Code 93 C#/VB Reading: 1D Codabar C#/VB Reading: 1D ITF-14 View All Barcodes >>
Very good product. I have compared it with several barcode scanners on the market before purchase. You are the best: fastest speed to read barcode symbol from files. Eymeon Evans