Skip to main content
Table of Contents

TTMSFNCWXCustomBarcodeDecoderBase.DecodeFromFile Method

Reads an image from disk and decodes the barcode it contains.

API unit family: TMSFNCWXBarcodeDecoder Declaring type: TTMSFNCWXCustomBarcodeDecoderBase

Syntax

FMX.TMSFNCWXBarcodeDecoder.hppPascalC++
procedure DecodeFromFile(const AFileName: string; const ACallback: TTMSFNCWXCustomBarcodeDecodeCallBackEvent = nil);
void __fastcall DecodeFromFile(const System::UnicodeString AFileName, const _di_TTMSFNCWXCustomBarcodeDecodeCallBackEvent ACallback = _di_TTMSFNCWXCustomBarcodeDecodeCallBackEvent());

Remarks

The file is converted to a base64 data stream and forwarded to DecodeFromBase64.

Parameters

Name Description
AFileName Full path to the image file to decode. The call is ignored when the path is empty or the file does not exist.
ACallback Optional callback invoked with the decode result; pass nil to rely on the OnDecoded event instead.