EasyBarCodeReadMail

Support

Required licenses

EasyBarCode

Recommended images

Any image from the folder Sample Images\EasyBarCode\MailBarCode

Location

[…]C:\Users\Public\Documents\Euresys\Open eVision 24.02\Sample Programs
\[LANGUAGE] samples
\Text and Code Reading\EasyBarCodeReadMail

Purpose

This sample program demonstrates how to:

Read a mail bar code in an image.

Code highlights

1. Read the mail bar codes present in the image.
m_Barcodes = m_Reader.Read(m_Source);
2. Retrieve the text encoded in the ith bar code.
string text = m_Barcodes[i].Text;
3. Retrieve the jth component (for example the Postal Code or Address in the screenshot) encoded in the ith bar code.
string composed = m_Barcodes[i].ComponentStrings[j].Key + " : " + m_Barcodes[i].ComponentStrings[j].Value;
4. Draw the position of the ith bar code on the image.
m_Barcodes[i].Draw(e.Graphics);