DBR_DecodeFileRect Function
Decodes barcodes in the specified image file by only searching a certain part of the image defined by the parameters top, left, width, height.
Syntax
int DBR_DecodeFileRect(
const char* pFileName,
const pReaderOptions pOption,
int iRectLeft,
int iRectTop,
int iRectWidth,
int iRectHeight,
pBarcodeResultArray *ppResults
);
Parameters
- pFileName
- A string defining the file name.
- pOption
- A structure defining the barcode reader options.
- iRectLeft
- An integer value that defines the left margin coordinate of scanning zone.
- iRectTop
- An integer value that defines the top margin coordinate of scanning zone.
- iRectWidth
- An integer that defines the width of scanning zone.
- iRectHeight
- An integer that defines the height scanning zone.
- ppResults
- A structure containing barcode results.
Return Value
Zero if the function completed successfully; otherwise nonzero.
Remarks
The file to read needs to be an image in the formats BMP, JPG, PNG, TIFF or PDF.
If your barcodes are from PDF files, DynamicPdf.dll and DynamicPdfx64.dll are mandatory.
Example
int iErrorCode = DBR_DecodeFileRect("C:\\test.bmp", &options, 0, 0, 100, 100, &pResults);
See Also
C > Structs > ReaderOptions
C > Structs > BarcodeResultArray
C > Function > DecodeFile
C > Constant > BarcodeFormat
C > Constant > Error List