ClearImage SDK
Programming

C++

Step 1: Install ClearImage SDK

Download and install the ClearImage SDK

Step 2: Configure your project

Use Visual Studio C++ ClearImage example project or follow the instruction below. When using the example project, copy ClearImage.dll in the executable folder or in the PATH.

In your Visual Studio C++ project:

  • Include a copy of C:\Program Files (x86)\Inlite\ClearImageSDK\ClearImage.wrapper.hpp in every source file that uses ClearImage API.
  • Add a copy of C:\Program Files (x86)\Inlite\ClearImageSDK\ClearImage.lib to your project's Properties->Linker->Input->Additional Dependencies entry.
  • Place ClearImage.dll in a location where it can be found according to Microsoft's DLL search order rules. Typically it is a working folder where your application started from. The ClearImage.dll is installed in:
    • 32-bit version from C:\Program Files (x86)\Inlite\ClearImageSDK\win32\ClearImage.dll
    • 64-bit version from C:\Program Files (x86)\Inlite\ClearImageSDK\x64\ClearImage.dll

This code demonstrates the use of ClearImage DLL API. Runtime errors are reported in ExceptionCI object.

C++


ClearImage project development

Extend functionality

While developing your application, you can combine code examples on this page with methods described in ClearImage API documentation. DLL API, as exposed through ClearImage.wrapper.hpp, is substantially similar to COM API and .NET API Inlite.ClearImage namespace.

Exception handling

ClearImage DLL API reports errors as an ExceptionCI object.

C#


Barcode Reading

Read 1D barcodes from a page

This example reads code 39 and code 128 barcodes. Set barcode types used in your application. Setting reader->AutoDetect1D=true; automatically finds the barcode type, but it is slower and is not recommended for production.

C++


Read 2D Barcode from a page

This example reads PDF417, DataMatrix, and QR code. 2D barcodes might contain binary data available in CiBarcode->Data property as std::vector<char>

C++


Read Postal Barcodes from a page

This example reads Postal Barcodes from an image file page.

C++


Read Driver's License barcode

This example reads the Driver's License barcode from an image file page.

C++


Read from a multi-page image file

This example reads barcodes from a single-page file or all pages of a multi-page image file.

C++



Image Processing

Repair image page

This example uses some of the most popular image-processing functions. In a production application, the specific sequence of functions should be selected based on specific application needs. 

C++


Repair all images in a multi-page file

This example repairs all images in a multi-page file and saves the result in the fileOut file.

C++