This function sets the pixel data you supply into the DIB image bitmap column specified by nX.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_DIB_column_set (
HIGEAR hIGear,
AT_PIXPOS nX,
AT_PIXPOS nY1,
AT_PIXPOS nY2,
const LPAT_PIXEL lpPixel,
AT_DIMENSION nNumPixels
);
|
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | HIGEAR handle of image. |
nX | AT_PIXPOS | X offset (X coord) of the vertical pixel column to be set. |
nY1 | AT_PIXPOS | Raster line number at which the vertical column starts. |
nY2 | AT_PIXPOS | Raster line number at which the column ends. |
lpPixel | const LPAT_PIXEL | Far pointer to first byte of your pixel data. |
nNumPixels | AT_DIMENSION | Number of pixels (not bytes) to transfer. |
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 for C and C++.
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ AT_PIXEL cPixArray[400]; /* Receives the returned pixels */ AT_PIXPOS nCol, nYtop, nYbot; /* Column and rows to get */ AT_DIMENSION nFetched; /* Holds the count of pixels retrieved*/ AT_ERRCOUNT nErrcount; /* Receives the returned error counts */ /* Restore the pixels saved by the call in example IG_DIB_column_get: */ nCol = 0; /* Restores to image's left boundary */ nYtop = 10; nYbot = 59; /* 50 pixels, from lines 10 thru 59*/ nFetched = nYbot - Top + 1; nErrcount = IG_DIB_column_set ( hIGear, nCol, nYtop, nYbot, &cPixArray[0],nFetched ); |
The pixel at nX is set in pixel rows nY1 through nY2 inclusive. nNumPixels is the number of pixels to set, and should equal (nY2-nY1+1).
If the image is 1-bit or 4-bit, your pixels should be one to a byte and right justified, beginning at lpPixel. If the image is 24-bit, each pixel should occupy 3 bytes, in Blue-Green-Red order.