ImageGear Professional v18.1 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_raster_size_get |
This function calculates and returns the number of bytes required to hold a line (raster) from the image.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_DIB_raster_size_get( HIGEAR hIGear, AT_MODE nFormat, LPAT_DIMENSION lpSize ); |
Name | Type | Description |
hIGear | HIGEAR | HIGEAR handle of the image. |
nFormat | AT_MODE | Format in which the raster data is stored: IG_PIXEL_PACKED, IG_PIXEL_UNPACKED, IG_PIXEL_RLE. |
lpSize | LPAT_DIMENSION | A far pointer to a variable in which the size of the raster line (in bytes) is returned. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
All pixel formats supported by ImageGear Professional.
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.