Description
Gets the
color of a specified pixel in this bitmap.
Syntax
GpStatus WINGDIPAPI GdipBitmapGetPixel(
GpBitmap* bitmap,
INT x,
INT y,
ARGB *color
);
PowerBASIC Syntax
DECLARE FUNCTION GdipBitmapGetPixel ( _
BYVAL pBitmap AS DWORD, _
BYVAL x AS LONG, _
BYVAL y AS LONG, _
BYREF pcolor AS DWORD _
) AS LONG
Parameters
bitmap
[in]
Pointer to the Bitmap object.
x
[in] Long
value that specifies the x-coordinate (column) of the pixel.
y
[in] Long
value that specifies the y-coordinate (row) of the pixel.
color
[out] Pointer
to a DWORD variable that receives the color of the specified pixel.
Remarks
Depending
on the format of the bitmap, GdipBitmapGetPixel might not return the
same value as was set by GdipBitmapSetPixel. For example, if you call GdipBitmapSetPixel
on a Bitmap object whose pixel format is 32bppPARGB, the pixel's RGB
components are premultiplied. A subsequent call to GdipBitmapGetPixel might
return a different value because of rounding. Also, if you call GdipBitmapSetPixel
on a Bitmap object whose color depth is 16 bits per pixel, information could be
lost during the conversion from 32 to 16 bits, and a subsequent call to GdipBitmapGetPixel
might return a different value.
|