This section provides information about how to delete DIBs and DDBs.
|
Copy Code
|
|
|---|---|
IG_image_DIB_export( hIGear, lpDIB, DIBSize, &Options); |
|
The DIB's address is returned in your LPAT_DIB variable lpDIB.
|
Copy Code
|
|
|---|---|
IG_dspl_DDB_create( hIGear, IG_GRP_DEFAULT, hDC, nWidth, nHeight, TRUE, &hBitmap, &hPalette ) |
|
Provide the HIGEAR handle of the image to delete, and provide the addresses of the HBITMAP and HPALETTE variables to receive the handles for the created DDB and palette.
|
Copy Code
|
|
|---|---|
IG_image_delete ( hIGear ); |
|
Note that in all the above cases, ImageGear will not release memory that it did not allocate. For example, assume your application has allocated memory, created a DIB, and subsequently used an IG_image_DIB_import() call to give this DIB a HIGEAR handle. In this case, a later call to IG_image_delete() will delete the HIGEAR structure but will not free the DIB's memory. The owner of the DIB's memory (in this case, your application) would issue a Windows DeleteObject() call to free this memory.