This function deletes the HIGEAR handle and all memory associated with it.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_image_delete( HIGEAR hIGear ); |
Arguments:
Name | Type | Description |
hIGear | HIGEAR | HIGEAR handle of image to delete. |
Return Value:
Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Sample:
All ImageGear DLL samples.
Example:
Copy Code | |
---|---|
// Create a new image with the same parameters as an existing image, // but with no pixel data allocated AT_ERRCOUNT nErrcount; // Number of errors on stack HIGEAR hIGear; // Handle of image // Load image file "picture.bmp" from working directory nErrcount = IG_load_file("picture.bmp", &hIGear); if(nErrcount == 0) { // ... // Destroy the image IG_image_delete(hIGear); } |
This function also frees the memory associated with the image's DIB, if ImageGear allocated the DIB memory. If ImageGear did not allocate the DIB memory, the DIB continues to exist, and it is the responsibility of your application to free this memory when done with it. |