Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Powerful Optical Barcode Recognition Component For Delphi Firemonkey By Winsoft

  1. Introduction

OBR (Optical Barcode recognition) component for Firemonkey supports Windows, macOS, iOS and Android. Its main purpose is to decode QR code and Barcode images. In the below video you can check the steps to install the firemonkey component for OBR. The installation steps differs to the one for the OBR firemonkey library, it is actually easier.

2. Components in the Demo and what they do

There are two panels. One is at the top, containing the button for the picture choise. In the middle there is a Scroll box component (for scrolling) and a Timage component inside it for the chosen picture. At the bottom there is another panel again, containing the TMemo component . All combined they create the windows that shows up with button, image and text at the bottom.

    Clicking on the button executes the TOpenPictureDialog component which opens a dialog for selecting a picture. The selected picture is loaded in an TImage component and shown on the main empty window.

Clicking on the button executes the TOpenPictureDialog component which opens a dialog for selecting a picture. The selected picture is loaded in an TImage component and shown on the main empty window.

[crayon-673fc2ee9a9d2211623327/]

Then the selected picture is decoded using the TBarcodeDecoder  object (the ‘scanner’) and the results is filled into the TDecodeResults list as it follows:

[crayon-673fc2ee9a9d9136802605/]

If code is detected by the TBarcodeDecoder  object, the result is stored in the TDecodeResults list, named as Barcodes. With FOR cycle we check the list and its items of what they have stored before. The item of the TDecodeResults list contains FormatName and Text (which is the doceded text). You can see in the below code:

[crayon-673fc2ee9a9da824040754/]

You can download the Demo with the component from the link below:

https://winsoft.sk/fobr.htm

Exit mobile version