With above C# code, you can decode all UPC-A barcode from a gif image file named "upca-csharp".
Distinguishing Features of C# UPC-A Barcode Encoding SDK
With two powerful functions, the C# UPC-A barcode encoding SDK from BarcodeLib.com successfully stands out from other barcode scanners.
Function 1: Read & decode a maximum UPC-A barcode with little scanning time
There is a property "maxOneBarcodePerPage" in our C#.NET UPC-A barcode encoding SDK.
If you set it to true, the reader will stop scanning once it detects one barcode.
If you set it to false, the reader will use total 5 algorithms and each will scan the whole source file from 4 directions.
Function 2: Only scan the barcode region to decode UPC-A barcode
In general, a barcode reader will scan both barcode area and non-barcode area. So it is an essential way to enhance the productivity by removing the recognition time spent in scanning the non-barcode region. By introducing the concept of coordinates-positioning, our barcode reader could easily locate the scanning region.
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.
For example, if the UPC-A barcode is located in the top 20% & bottom 20% area, we could direct the reader only to scan in this area by using following C#.NET programming codes:
OptimizeSetting setting = new OptimizeSetting();
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);