Run ASP.NET UPC-A Barcode Decoder Using VB.NET Class Library
Sample VB.NET code is listed here to help users decode & scan all UPC-A barcodes from an image source (For example: a gif image file called "upca-aspnet").
Dim datas() AsString = BarcodeReader.read("c:/upca-aspnet.gif", BarcodeReader.UPCA)
Enhance UPC-A Barcode Recognition Rate in ASP.NET Website
ASP.NET UPC-A Barcode Reader from BarcodeLib.com owns the capacity to speed up decoding rate in two situations.
Situation 1: Read a maximum UPC-A barcode from an image file: Common UPC-A barcode readers will use total 5 algorithms and scan the whole image from 4 directions. It is time-consuming. But our barcode reader provide a function called "maxOneBarcodePerPage".
If user sets "maxOneBarcodePerPage" to true, the reader will stop reading after it detects one UPC-A barcode.
Situation 2: Read an UPC-A barcode from a large-size image source: In the practical applications, an UPC-A barcode is sometimes located in a certain part of a large-size image file. But in general, the reader will scan the whole image to decode an UPC-A barcode. Thus, most recognition time is used to scan the non-barcode region.
So why not direct the reader to only scan the barcode region? To meet this goal, our UPC-A barcode reader offers users the possibility to locate the barcode region. And detailed C# & VB.NET codes are listed below:
For C#.NET UPC-A barcode reading program:
OptimizeSetting setting = new OptimizeSetting();
setting.setMaxOneBarcodePerPage(true);
ScanArea top20 = new ScanArea(new PointF(0.0F, 0.0F), new PointF(100.0F, 20.0F));
ScanArea bottom20 = new ScanArea(new PointF(0.0F, 80.0F), new PointF(100.0F, 100.0F));
List<ScanArea> areas = new List<ScanArea>(); areas.Add(top20); areas.Add(bottom20);
Dim setting As OptimizeSetting = New OptimizeSetting()
setMaxOneBarcodePerPage(True)
Dim top20 As ScanArea = New ScanArea(New Drawing.PointF(0.0F, 0.0F), New Drawing.PointF(100.0F, 20.0F))
Dim bottom20 As ScanArea = New ScanArea(New Drawing.PointF(0.0F, 80.0F), New Drawing.PointF(100.0F, 100.0F))
Dim areas As List(Of ScanArea) = New List(Of ScanArea) areas.Add(top20) areas.Add(bottom20)
setting.setAreas(areas)
Dim datas() AsString = BarcodeReader.read("c:/upca-aspnet.gif", BarcodeReader.UPCA, setting)
Note: the most left top point is (0%, 0%), and most right bottom point is (100%, 100%). The point X, Y values are expressed in percentage of the whole image.
ASP.NET UPC-A Barcode Scanning DLL Supported Barcode Types
Apart from ASP.NET UPC-A Barcode Scanner, BarcodeLib.com also provides other linear & 2D barcode readers.