ReadBarCode
Overview
void *STReadBarCode(void *hBarcode, char *file, char *type, char ***bc, char ***bc_type)
STReadBarCode scans an image file for barcodes and returns the number of barcodes found or an error number.
hBarcode | Handle to barcode session. |
file | (input) is the name of the image file to scan. |
type | (input) is the type of file ("jpg" or "tif"). If this value is set to NULL then the file type is determined from the file extension. |
bc | (output) is a pointer to an array of character strings containing barcodes. |
bc_type | (output) is a pointer to an array of character strings containing the barcode types in the bar_codes array. |
Return Value
A negative number indicates an error (see below), other values inidicate the number of barcodes found in the file.
ST_ERROR_FILE_OPEN (-1) | Cannot open image file |
ST_ERROR_MULTI_PLANE (-2) | Multiplane images not supported |
ST_ERROR_BITS_PER_SAMPLE (-3) | Unsupported number of bits per sample |
ST_ERROR_MALLOC (-4) | Memory allocation error |
ST_ERROR_COLOR_TIFF (-5) | Unsupported compression |