ImageGear for C and C++ on Windows v19.10 - Updated
Retrieving DIB Information
User Guide > Concepts > Migrating from ImageGear v14 > Retrieving DIB Information

If you formerly retrieved information about an image by getting a pointer to the DIB and reading from the DIB header, refer to this table to see how to get the same information in other ways:

DIB header field From a HIGEAR... From a HIGDIBINFO...
biSize N/A N/A
biWidth IG_image_dimensions_get IG_DIB_width_get
biHeight IG_image_dimensions_get IG_DIB_height_get
biPlanes N/A N/A
biBitCount* (see following sections) IG_image_dimensions_get, IG_DIB_legacy_bit_depth_get IG_DIB_bit_depth_get, IG_DIB_channel_count_get + IG_DIB_channel_depths_get
biCompression* (see following sections) IG_image_colorspace_get, IG_image_compression_type_get IG_DIB_colorspace_get
biSizeImage N/A N/A
biXPelsPerMeter IG_image_resolution_get IG_DIB_resolution_get
biYPelsPerMeter IG_image_resolution_get IG_DIB_resolution_get
biClrUsed N/A N/A
biClrImportant N/A N/A

Note that you need a HIGDIBINFO handle for all functions in the right column of this table. Here's an example of how to get one from a HIGEAR, get some information, and clean up:

 
Copy Code
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */ 
HIGDIBINFO hDIBInfo;    /* DIB info handle */ 
HIGEAR hImage;          /* HIGEAR handle of image */ 
AT_DIMENSION width;     /* Returned width of image */ 
nErrcount = IG_image_DIB_info_get(hImage, &hDIBInfo); 
width = IG_DIB_width_get(hDIBInfo);
IG_image_DIB_info_delete(hDIBInfo);