using IronBarCode;
/*** READING BARCODES FROM IMPERFECT IMAGES, PHOTOS AND SCANS ***/
// Shorthand:: BarcodeReader.QuicklyReadOneBarcode will automatically try to clean and deskew barcodes from images if you add 'true' as the last TryHarder parameter
BarcodeResult Result = BarcodeReader.QuicklyReadOneBarcode("QuickStart.jpg", BarcodeEncoding.All, true);
// All BarcodeResult 'Read' methods provide the developer with control to correct image and photograph correction and straightening rotation and perspective from skewed images
// * RotationCorrection - un-skews and removes perspective from barcode images.
// * ImageCorrection - separates Barcodes from background imagery and digital noise.
// * BarcodeEncoding - BarcodeEncoding.Code128 Setting a specific Barcode format improves speed and reduces the risk of false positive results
// Example with a photo image
BarcodeResult PhotoResults = BarcodeReader.ReadASingleBarcode("Photo.png", BarcodeEncoding.Code128, BarcodeReader.BarcodeRotationCorrection.Medium, BarcodeReader.BarcodeImageCorrection.DeepCleanPixels);
// Example with a scanned document as a PDF
PagedBarcodeResult[] ScanResults = BarcodeReader.ReadBarcodesFromPdf("Scan.pdf", BarcodeEncoding.QRCode | BarcodeEncoding.PDF417, BarcodeReader.BarcodeRotationCorrection.Low, BarcodeReader.BarcodeImageCorrection.LightlyCleanPixels);
// Small or 'Thumbnail' barcode images are automatically detected by IronBarCode and corrected for wherever possible even if they have much digital noise.
BarcodeResult SmallResult = BarcodeReader.QuicklyReadOneBarcode("ThumbnailOfBarcode.gif", BarcodeEncoding.Code128);
Imports IronBarCode
'''* READING BARCODES FROM IMPERFECT IMAGES, PHOTOS AND SCANS **
' Shorthand:: BarcodeReader.QuicklyReadOneBarcode will automatically try to clean and deskew barcodes from images if you add 'true' as the last TryHarder parameter
Private Result As BarcodeResult = BarcodeReader.QuicklyReadOneBarcode("QuickStart.jpg", BarcodeEncoding.All, True)
' All BarcodeResult 'Read' methods provide the developer with control to correct image and photograph correction and straightening rotation and perspective from skewed images
' * RotationCorrection - un-skews and removes perspective from barcode images.
' * ImageCorrection - separates Barcodes from background imagery and digital noise.
' * BarcodeEncoding - BarcodeEncoding.Code128 Setting a specific Barcode format improves speed and reduces the risk of false positive results
' Example with a photo image
Private PhotoResults As BarcodeResult = BarcodeReader.ReadASingleBarcode("Photo.png", BarcodeEncoding.Code128, BarcodeReader.BarcodeRotationCorrection.Medium, BarcodeReader.BarcodeImageCorrection.DeepCleanPixels)
' Example with a scanned document as a PDF
Private ScanResults() As PagedBarcodeResult = BarcodeReader.ReadBarcodesFromPdf("Scan.pdf", BarcodeEncoding.QRCode Or BarcodeEncoding.PDF417, BarcodeReader.BarcodeRotationCorrection.Low, BarcodeReader.BarcodeImageCorrection.LightlyCleanPixels)
' Small or 'Thumbnail' barcode images are automatically detected by IronBarCode and corrected for wherever possible even if they have much digital noise.
Private SmallResult As BarcodeResult = BarcodeReader.QuicklyReadOneBarcode("ThumbnailOfBarcode.gif", BarcodeEncoding.Code128)