This function initializes the ImageGear library and must be called before any other ImageGear function is used.
The first parameter is a pointer to the X Windows display obtained from calling XOpenDisplay() (or equivalent). Set the display parameter to NULL if your application does not display any images, or use X Window System capabilities.
Use the second parameter, nColors, to specify the number of colors that ImageGear should allocate for PseudoColor displays. Normally, you set this number to 256.
Copy Code
|
|
---|---|
AT_ERRCODE IG_initialize( |
Name | Type | Description |
---|---|---|
lpDisplay | LPVOID | X Windows display pointer or NULL. |
nColors | UINT | The number of colors to allocate for PseudoColor displays. |
lpPrivateColormap | LPVOID | This argument currently isn’t used, but is reserved for future use. Must be set to NULL for now. |
Returns the number of ImageGear errors that occurred during this function call.
This function does not process image pixels.
The use of this depends upon whether the program has a display or not. The first example program has a display; the second does not:
Copy Code
|
|
---|---|
/* Initialize ImageGear */ |
ImageGearDemo