ImageGear for C and C++ on Windows v20.0 - Updated
IG_DIB_info_raster_size_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_info_raster_size_get

This function returns the number of bytes per raster in the DIB.

Declaration:

 
Copy Code
AT_INT ACCUAPI IG_DIB_info_raster_size_get(
        HIGDIBINFO hDIB
);

Arguments:

Name Type Description
hDIB HIGDIBINFO DIB info handle.

Return Value:

Returns DIB raster size.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

MFC PDF Demo

Example:

 
Copy Code
HIGDIBINFO hDIBInfo;    /* DIB info handle */
AT_INT rasterSize;      /* Returned raster size */
rasterSize = IG_DIB_info_raster_size_get(hDIBInfo);

Remarks:

For all images except 1-bit images, the returned number is precise.

For 1-bit images, the function returns the raster size assuming that 8 pixels are packed per byte. In reality, ImageGear internally stores 1-bit images using run ends scheme. The size of the raster stored in memory depends on the content of the raster, but usually the raster occupies much less space than the number returned by IG_DIB_info_raster_size_get.

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