ClearImage SDK
Programming

Java

Step 1: Install ClearImage SDK

Download and install the ClearImage SDK.

Step 2: Configure your project

Add ClearImageJ.jar to CLASSPATH. Typically file is located in C:\Program Files (x86)\Inlite\Libs folder.

Java API uses several methods to locate ClearImage.dll listed below in descending priority.

  • Explicit path using the CiServer.loadClearImage(ClearImageDllPath) method.
  • Folder specified by -Djava.library.path="ClearImageDllPath" on the java command line.
  • Folders specified by the PATH environmental variable

Use the correct 32-bit or 64-bit version of ClearImage.dll, that matches your Java runtime version. ClearImage.dll is located in subfolder of C:\Program Files (x86)\Inlite\ClearImageSDK folder \win32 and \x64

This code demonstrates the use of ClearImage Java API. Runtime errors are reported in Exception object.

Java


ClearImage project development

Extend functionality

While developing your application, you can combine code examples on this page with methods described in ClearImage API documentation .

Exception handling

ClearImage Java API reports errors as an Exception 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.setAutoDetect1D(EBoolean.ciTrue); automatically finds the barcode type, but it is slower and is not recommended for production.

Java


Read 2D Barcode from a page

This example reads PDF417, DataMatrix, and QR code. 2D barcodes might contain binary data available from Bc.getData() as byte[]

Java


Read Postal Barcodes from a page

This example reads Postal Barcodes from an image file page.

Java


Read Driver's License barcode

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

Java


Read from a multi-page image file

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

Java



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. 

Java


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.

Java