ImageGear Professional DLL v17.1 for Windows Accusoft
IG_DIB_raster_size_get
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_raster_size_get

Glossary Item Box

This function calculates and returns the number of bytes required to hold a line (raster) from the image.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_DIB_raster_size_get(
        HIGEAR hIGear, 
        AT_MODE nFormat, 
        LPAT_DIMENSION lpSize
);

Arguments:

hIGear HIGEAR handle of the image.
nFormat Format in which the raster data is stored: IG_PIXEL_PACKED, IG_PIXEL_UNPACKED, IG_PIXEL_RLE.
lpSize A far pointer to a variable in which the size of the raster line (in bytes) is returned.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Sample:

Pixel Access

Remarks:

You can use this function to determine the size of a block of memory to allocate before using IG_DIB_raster_get(), to avoid data overflow. The returned size will include allocation for buffering at the end of the rasters. (See the section Device-Independent Bitmaps (DIB) for more information on buffering in DIBs.) The nFormat variable determines in what form you would like to store the pixels in. The size will vary according to the storage method.

©2012. Accusoft Corporation. All Rights Reserved.