How-To: ClearImage

Table of contents
ClearImage functionality is packaged as:
  • ClearImageNet.dll – .NET assembly supports AnyCPU, x86 and x64 development.
  • ClearImage.dll – Windows DLL supports COM and JNI entry points. The DLL is distributed as 32-bit version (ClearImage.dll) and 64-bit version (ClearImage.x64.dll). ClearImage COM is registered during the installation process.

The following describes the essential steps of using ClearImage in various programming environments.


.NET is a higher level API implemented in the Inlite.ClearImageNet namespace of ClearImageNet.70.

The ClearImageNet assembly also contains a secondary Inlite.ClearImage namespace that is substantially compatible with the COM API, and is specifically designed to ease the migration from ClearImage COM API applications to .NET. It also supports a few low level functions that are not accessible through the Inlite.ClearImageNet namespace. Since it mirrors the COM API no additional examples are provided.

To use .NET API add reference to ClearImageNet.70 assembly. Code below demonstrates recommended use of ClearImage .NET API.



ClearImage installers automatically place ClearImageNet.dll in the GAC. To use it locally (e.g. from executable file folder) remove it from the GAC either from the Inlite Control Center’s Versions tab or by running: gacutil -uf ClearImageNet.70


This is a lower level API to support development in all languages that can interface to the Windows COM model. Code below demonstrates recommended use of ClearImage COM API.



If    PHP Fatal error: Class ‘COM’ not found is detected, add this section to php.ini
  fastcgi.impersonate = 0
ClearImage exceptions can be recorded in a log file configured through php.ini parameters: ‘log_errors’ and ‘error_log’.


Add ClearImage COM to your project:

  • In Project menu select Import Type Library
  • Select ClearImage COM Server in list box
  • Click on the Create Unit button

For Console (DOS) application:

  • Add to uses ActiveX, Windows
  • Call CoInitialize(nil); before any ClearImage calls
  • Call CoUnInitialize; before exiting the application


Create ClearImage COM Server:

Multiple versions of ClearImage COM can be installed on the same system. Use Inlite Control Center’s Versions tab to check current version and/or activate different version.

Registration-free COM

Alternatively use this manifest to load ClearImage COM in registration-free COM configuration.

Java API

To use Java API:

  • 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 the order of declining priority.
    1. Explicit path using the CiServer.loadClearImage(ClearImageDllPath) method.
    2. Folder specified by -Djava.library.path="ClearImageDllPath" on the java command line.
    3. Folders specified by the PATH variable
    4. COM registered DLL path, typically displayed in the Inlite Control Center’s Version Tab.
    The recommended methods is a COM registered DLL This method has the lowest priority for compatibility with the existing installations. To use it neither ClearImage.dll nor ClearImage.x64.dll should be present locations of the higher priority methods.
This code demonstrates recommended use of ClearImage Java API.