WinXDraw_GetImagePixel


RGBA rgba = WinXDraw_GetImagePixel (hImage, x, y)

Retreives the value of a pixel from an image

Parameter Description
hImage The handle to the image to get the pixel from
x The 0 based x coordinate of the pixel
y The 0 based y coordinate of the pixel

Returns

An RGBA structure describing the pixel, all initialised to 0 on fail.

Remarks

The RGBA structure has 4 members:

You can convert an RGBA structure into a normal colour value with colour = XLONGAT(&rgba)

Examples

'Declare an RGBA structure
RGBA rgba

...

'get the upper left hand pixel from an image
rgba = WinXDraw_GetImagePixel (hImage, 0, 0)

Related Links

Images
WinXDraw_LoadImage
WinXDraw_SetImagePixel
WinXDraw_GetImageChannel
WinXDraw_GetImageInfo