ImageGear for C and C++ on Windows v19.10 - Updated
IG_image_DIB_info_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image DIB Functions > IG_image_DIB_info_get

This function returns the handle of a new DIB info object containing information about the given image.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_image_DIB_info_get(
   HIGEAR hIGear,
   HIGDIBINFO* lphDIB
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of image from which to create DIB info object.
lphDIB HIGDIBINFO* Returned DIB info object handle.

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++.

Sample:

Medical, Palette Edit, MFC PDFDemo

Example:

 
Copy Code
AT_ERRCOUNT nErrcount;  // Number of errors on stack
HIGEAR hIGear;          // Handle of image
HIGDIBINFO hDIBInfo;    // DIB info handle

// Load image file "picture.bmp" from working directory
nErrcount = IG_load_file("picture.bmp", &hIGear);
if(nErrcount == 0)
{
    nErrcount = IG_image_DIB_info_get(hIGear, &hDIBInfo);
    // ...
    // Delete DIBInfo object
    IG_DIB_info_delete(hDIBInfo);
    // Destroy the image
    IG_image_delete(hIGear);
}

Remarks:

The application must delete the HIGDIBINFO object after it is done using it by calling IG_DIB_info_delete.