ImageGear's set of over 40 display-related functions allows you to control where and with what attributes your application displays each of its images. Among the attributes you can set on an image-by-image basis are:
- Contrast adjustment
- Brightness adjustment
- Gamma correction
- Dithering
- Anti-aliasing enhancement
- Rotation
- Region within the display area in which the image is to be displayed (this area is called the Device Rectangle)
- The portion of the image to display (this array of pixels within the DIB bitmap is called the Image Rectangle)
- How to fit the Image Rectangle to the Device Rectangle
- The background fill pattern and color to use (for any area of the Device Rectangle left vacant by the image)
Also, by using the image's LUTs (Look-Up-Tables), you can translate the colors in the image's color palette to other colors you select (and therefore you can, for example, display an 8-bit grayscale image in any 256 colors you choose).
All of the above display attributes take effect during display only. They do not alter either the image bitmap or the color palette in the DIB.
In addition, any time your image is being displayed, you can center, zoom, or scroll it from within your application.
The key concepts of the display functionality are display options, display option groups, and display operations.
- A display option is a variable that is assigned a value (or a setting) from a predefined list. Every option has a default value associated with it, and is therefore always defined.
- A display option group is the complete set of all options' values.
Every handle of an ImageGear image (HIGEAR) contains a set of option groups. ImageGear does not impose any restrictions on the size of this set, i.e., on the number of option groups that are stored with any given HIGEAR. You do not need to allocate or de-allocate the storage space for the groups. You can, however, reset all group options to their default values.
Each option group has its own ID. This ID is a DWORD integer and is unique in the scope of a given HIGEAR; i.e., every pair {HIGEAR, DWORD} uniquely identifies an option group. The reason for introducing option groups and associating multiple groups with a single image handle is to provide a convenient means of drawing the same image on multiple devices. In this case, a separate option group may be allocated for each of the devices, and later used whenever the image is output to the corresponding device without the need to reassign options values.
- A display operation is an action such as displaying or printing an image. Every operation requires an option group whose identifier is passed as a parameter to the function that performs the operation. This group affects the result of the operation and the way in which it is achieved.
This section provides information about how to use the features described above, and how to use additional special purpose IG_dspl_image_draw...() functions: