# EasyCodeReading

| Support            | ![](assets/images/sample_programs/applies_to/cpp.svg) ![](assets/images/sample_programs/applies_to/cs.svg) ![](assets/images/sample_programs/applies_to/qt.svg)   |
|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Required licenses  | **EasyBarCode**, **EasyMatrixCode**, **EasyQRCode**                                                                                                               |
| Recommended images | Any image from the folder `Sample Images/EasyCodeReading`                                                                                                         |
| Location           | `Text and Code Reading/EasyCodeReading` and `Console samples/Text and Code Reading`                                                                               |

## Purpose

This sample program demonstrates how to:

- Read a bar code, a data matrix and a QR code in an image with a single read call.

![](assets/images/sample_programs/text_and_code-easycodereading.webp)

## Code highlights

1. Locate and read the bar code, the data matrix and the QR codes in the image.
   ```c++
   m_Codes = m_Reader.Read(m_Src);
   ```
2. Retrieve the text encoded in the codes.
   ```c++
   text = text + Codes[iCode].GetDecodedString();
   ```
3. Draw the position of the data matrix code on the image.
   ```c++
   Codes[iCode].DrawPosition(drawAdapter);
   ```
