How to Decode Codabar Barcode Using VB.NET Class Code
Using one-line VB.NET class code, you can read & decode all Codabar barcodes from target image file. But to protect our copyright, the trial VB.NET barcode reader component will decode Codabar barcode and return the first character with random value.
Dim datas() AsString = BarcodeReader.read("c:/ codabar-vbnet.gif ", BarcodeReader.CODABAR)
How to Read & Decode Codabar from Large-Size Barcode Image
As for reading & decoding .NET Codabar barcode from large-size image file, you can largely improve the barcode reading efficiency by using following two ways.
Read maximum Codabar barcode per page
If there is only one Codabar barcode in the target image file, then you can set "maxOneBarcodePerPage" to true. Then the barcode scanner library will not scan once it detects a Codabar barcode in VB.NET project.
Otherwise, it will use total 5 algorithms to detect Codabar and each will scan the whole image from 4 directions.
Decode Codabar barcode from specified area of source image
When scanning some large-size source image files, it will be much more effective if we save the time that spend on scanning the non-barcode region. And our VB.NET barcode scanner can help you achieve that by offering the capacity to define scanning area.
For example, if you want to scan the top 20% and bottom 20% area of source image, you can use following VB.NET class code to achieve that.
Note: The most top left point is (0%, 0%) and the most bottom right point is (100%, 100%).
Dim setting As OptimizeSetting = New OptimizeSetting()
setting.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:/codabar-vbnet.gif", BarcodeReader.CODABAR, setting)
Barcode Types Supported in VB.NET Barcode Scanner Library