public BarcodeData() - (instancetype)init public BarcodeData() public:BarcodeData();
__init__() # Default constructor This constructor initializes the BarcodeData member as follows:
| Member | Value |
|---|---|
| Symbology | BarcodeSymbology.Unknown |
| Bounds | LeadRect.Empty |
| RotationAngle | 0 |
| BarWidthReduction | 0 |
| Byte array inside GetData | null (Nothing in Visual Basic) |
| Value | null (Nothing in Visual Basic) |
| Tag | null (Nothing in Visual Basic) |
To quickly construct a new BarcodeData object with a specific symbology and data, use BarcodeData(BarcodeSymbology symbology, byte[] data) or BarcodeData(BarcodeSymbology symbology, string value).
To create an instance of BarcodeData suitable for writing for a specified symbology, use CreateDefaultBarcodeData.
using Leadtools;using Leadtools.Codecs;using Leadtools.Barcode;using Leadtools.ImageProcessing;public void BarcodeData_Example(){string imageFileName = Path.Combine(LEAD_VARS.ImagesDir, "Barcode1.tif");// Create a Barcode engineBarcodeEngine engine = new BarcodeEngine();// Load the imageusing (RasterCodecs codecs = new RasterCodecs()){using (RasterImage image = codecs.Load(imageFileName, 0, CodecsLoadByteOrder.BgrOrGray, 1, 1)){// Read the first barcodeBarcodeData data = engine.Reader.ReadBarcode(image, LeadRect.Empty, BarcodeSymbology.Unknown);// Show the barcode data found (if any)if (data != null){Console.WriteLine("Found barcode at {0}", data.Bounds);Console.WriteLine("Symbology: {0}", data.Symbology);Console.WriteLine("Data: {0}", data.Value);}}}}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
