ImageGear Professional v18.1 > User Guide > Using ImageGear > Images and Documents > Working with Image Utility Functions > Deleting DIBs and DDBs |
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, NULL ) |
Provide the HIGEAR handle of the image to delete, and provide the addresses of the HBITMAP (CGImageRef) variables to receive the handle for the created DDB.
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 free() call to free this memory.
To delete a DDB being created with IG_dspl_DDB_create, use a CGImageRelease(hBitmap) call.