Your ImageGear for C and C++ toolkit contains a comprehensive set of sample application programs, which are installed together with ImageGear shared object libraries and related files. Each sample is provided in source form. You can compile and execute each application to see the actual effects of the ImageGear function calls within it, or examine the source file to find examples of ImageGear API function calls and accompanying platform-specific calls. In addition, Accusoft permits you to use the sample applications’ source code. You can use the sample code as is, or cut and paste from it as you wish, to create, then expand, your own applications. The only restriction is that you may not distribute the original ImageGear sample applications with your applications.
The easiest ImageGear sample application is igconsole. It is a console-only application that does not require or use any UI. It lets you convert an image from one format to another.
All major operations that can be accomplished using ImageGear are demonstrated in the filters sample. It is a Motif-based GUI sample that lets you load and display images, apply basic image processing operations, and work with annotations. By running this application and then examining its source code, you can see how the calls to ImageGear functions such as IG_load_...(), IG_dspl_...() and IG_fltr_...() interact with the requirements and procedures of Linux programming. You can later use this program as a template for developing an application of your own.
The samples are located in the directory to which you have installed ImageGear (see the Description of Installed Files).
You can begin developing an application easily by choosing an appropriate sample to start with as a template, making a backup copy to preserve it, and editing it - cutting and pasting whole sections from other samples, if you wish. In this way, you will begin with a working program that displays images on your screen from the start, so you can test and debug each new feature as you add it to your code.
The ImageGear for C and C++ samples are listed in the table below.
The samples are located in the directory to which you have installed ImageGear (see the Description of Installed Files).
Sample Name | Description |
---|---|
filters |
The Filters sample is a fully functional Motif-based GUI sample that demonstrates all major operations that can be accomplished using ImageGear. See Loading and Displaying an Image, Converting and Displaying an Image DDB, and Displaying an Image with Scroll Bars for more information on using this sample. The Filters sample requires Motif (http://www.opengroup.org/openmotif/). |
igconsole |
The Console sample demonstrates how to load an image in one format and convert it to another format. See Converting an Image for more information.
The Console sample application is available via the Command Line only. It does not require or use a User Interface.
|
med |
The Medical sample demonstrates the imaging features of ImageGear Medical Component. |
threads | The Threads sample demonstrates ImageGear thread safety features. |
This section is set up as a tutorial, and uses the sample applications as a guide. During the tutorial, you will perform a variety of functions using the sample images. You will:
While performing the steps in this tutorial, you will be introduced to the ImageGear constants that you can use to greatly enhance the flexibility of ImageGear’s functions.
To start the tutorial, access the samples on your system. The samples are located in the directory to which you have installed ImageGear (see the Description of Installed Files).
The IG_initialize() and the IG_close() functions are Linux-specific functions that must be called in every imaging application.
This section provides information about the following: