# EasyQRCodeRead

| 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) ![](assets/images/sample_programs/applies_to/vb.svg) ![](assets/images/sample_programs/applies_to/python.svg)   |
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Required licenses  | **EasyQRCode**                                                                                                                                                                                                                                                                  |
| Recommended images | Any image from the folder `Sample Images/EasyQRCode`                                                                                                                                                                                                                            |
| Location           | `Text and Code Reading/EasyQRCodeRead` and `Console samples/Text and Code Reading`                                                                                                                                                                                              |

## Purpose

This sample program demonstrates how to:

- Read a QR code in an image.

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

## Code highlights

1. Locate and read the QR codes in the image.
   ```c++
   _qrCodes = _reader.Read();
   ```
2. Retrieve the text encoded the QR code.
   ```c++
   _decodedStrings.push_back(_qrCodes[i].GetDecodedString(_decodedStringsByteMode));
   ```
3. Draw the grid, the position and the erroneous modules of the QR code on the image.
   ```c++
   pDoc->_qrCodes[i].Draw(drawAdapter, 1.0f, 1.0f, 0, 0);
   ```
