ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > Core Component API Reference > Core Component Functions Reference > General Image Functions > IG_image_delete

This function deletes the HIGEAR handle and all memory associated with it.


Copy Code
   HIGEAR hIGear


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 for C and C++.


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

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.

Is this page helpful?
Yes No
Thanks for your feedback.