ImageGear Professional DLL v17.1 for Windows Accusoft
IG_DIB_raster_set
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_set

Glossary Item Box

This function sets a horizontal raster line of pixels into the DIB image bitmap.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_DIB_raster_set (
        HIGEAR hIGear, 
        AT_PIXPOS nYpos, 
        Const LPAT_PIXEL lpPixel, 
        AT_MODE nFormat 
);

Arguments:

hIGear HIGEAR handle of an image.
nYpos Raster line number (0 is top line).
lpPixel Far pointer to first byte of the pixel data to set.
nFormat A variable of type AT_MODE which indicates in which manner the raster data should be stored: IG_PIXEL_PACKED, IG_PIXEL_UNPACKED, or IG_PIXEL_RLE.

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

Example:

See the example for function IG_DIB_raster_get().

Remarks:

nFormat should be set to the same format in which the rest of the data in the DIB is stored. If you choose IG_PIXEL_PACKED, your array of bytes should be padded with zeroes on the right, just as it is in the standard DIB format, such that its length is a multiple of 4.

ImageGear's pixel access functions consider the coordinates (0,0) to refer to the upper left-hand corner of the bitmap data. They do not follow the DIB's orientation, which considers (0,0) to refer to the lower left-hand corner of the bitmap.

If the image you are modifying is 1-bit, you must convert the image from run-end encoded to a standard DIB, before you can set pixel values. Please see the section Using Pixel Access Functions with ImageGear for details.

©2012. Accusoft Corporation. All Rights Reserved.