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

Learn How To Deploy A Powerful Camera Component For Delphi On iOS With WINSOFT

  1. Introduction

Camera for iOS is a Firemonkey component that only works on the iOS platform. It makes use of the AVFoundation framework and offers a native video preview. It also recognizes native barcodes (EAN, QR Code, Data Matrix, Aztec, UPC-E, PDF417, ITF 14, and so on) and native faces.

2. Components in the Demo and what they do.

 

The Demo includes a TabControl that opens two screens (tabs). The ‘Preview’ screen opens the camera in the format specified in the ‘Settings’ screen. The Camera component’s main settings are available on the Settings screen. The description of a particular setting is displayed using TLabel, and the Dropdown options are loaded into TComboBox. For example, at the top, you can toggle between the rear and front cameras, which will open one of the phone’s cameras. The following code demonstrates how this is handled:

[crayon-676cb91d7285d185081706/]

The function FindDevice goes through the camera devices of the phone and filters the chosen one by name, as it follows:

[crayon-676cb91d72863348173031/]

The same structure and logic are used for the remaining settings, such as camera format, resolution, Flash on/off, Torch on/off, and so on.

There are two timers as well, one for face recognition and one for barcode recognition. When they are activated, they both hide the rectangles for Face recognition or barcode recognition, depending on which has been captured by the Camera component.

[crayon-676cb91d72864457353822/]

In the short video below you can see the Demo in action:

You can download the Demo from the link below:

https://winsoft.sk/icamera.htm

Learn more about a powerful and flexible hard disk space manager called Tree Size in this article.

You may also try Firemonkey’s Native Ios App Builder; you can deploy a Powerful Camera Component in the Delphi or C++ environments. Try the free tool here.

Exit mobile version