This function obtains the pixel at coordinates (nXpos, nYpos), storing it right justified (that is, in the least significant bits) at the location pointed to by lpPixel.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_DIB_pixel_get ( HIGEAR hIGear, AT_PIXPOS nXpos, AT_PIXPOS nYpos, LPAT_PIXEL lpPixel ); |
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | HIGEAR handle of image. |
nXpos | AT_PIXPOS | X offset (in pixels) from beginning of raster line. First pixel on line is pixel number 0. |
nYpos | AT_PIXPOS | Raster line number. 0 is top line. |
lpPixel | LPAT_PIXEL | Far pointer to byte at which to store pixel (or to a 3-byte area if a 24-bit pixel). |
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++.
Pixel Access, FlashPix
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ AT_PIXEL cPixelValue[3];/* 3 bytes in case 24-bit image */ /* Get value of the upper-leftmost pixel in image: */ IG_DIB_pixel_get ( hIGear, 0, 0, &cPixelValue[0] ); |
If the pixel is 1-bit or 4-bit, the remaining bits of the byte will be set to zeroes.
If the pixel is 24-bit, 3 bytes are returned. These will be in the order Blue-Green-Red (unless you have changed the order of the image bitmap bytes such as by calling function IG_IP_swap_red_blue()).