Programming with LEADTOOLS Barcode
LEADTOOLS supports reading and writing barcodes, finding duplicate barcodes, and obtaining barcode information read into barcode objects for major barcode types, including:
To add barcode functionality to your applications, you must first unlock the appropriate barcode module.
Before using any of the functions for reading or writing barcodes, or finding duplicate barcodes, the Barcode DLLs must be loaded and the engine initialized by calling L_BarCodeInit. The barcode functions described below can then be used. Before terminating the application however, L_BarCodeExit must be called to close the engine and free the DLLs.
LEADTOOLS provides one function for recognizing barcodes in the bitmap, and another function for writing the barcode to the bitmap.
You can use the L_BarCodeRead function, to search for barcodes in the bitmap. This function can recognize one or more barcodes in the bitmap with suitable function parameters. To write linear, Data matrix, PDF or QR barcode symbols, use the L_BarCodeWrite function. Use the L_BarCodeVersionInfo function to get the Barcode product information.
You can read/write barcodes by specifying a color for bars and space. Also, you can write transparent barcode, but the transparent feature is not recommended.
LEADTOOLS provides a number of functions to let you work with duplicated barcodes. They let you:
Find the number of duplicates of a specific barcode
Determine whether a specific barcode is duplicated
Get the index of the first duplicated barcode
Get the index of a subsequent barcode
In addition to the Barcode functions given above, there are a number of functions for working with duplicated barcodes. These are as follows: L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetFirstDuplicated and L_BarCodeGetNextDuplicated.
If you want to change the duplicated barcode, you must change the nSizeofBarCodeData, and pszBarCodeData members of BARCODEDATA structure.
To retrieve information about a barcode, use the L_BarCodeVersionInfo.
When the array of structures allocated by L_BarCodeRead is no longer needed, the memory should be freed using L_BarCodeFree.
LEADTOOLS Barcode Modules support reading and writing all barcode types to or from all image file types currently supported by LEADTOOLS.
For a full list of supported file formats, refer to:
Summary of All Supported Image File Formats.
For more information, refer to: