- Documentation
- Client functions
- dxGetPixelColor
Function
dxGetPixelColor
Returns the colour of pixel (x, y) from pixels in plain format.
Syntax
int, int, int, int dxGetPixelColor(string pixels, int x, int y)Arguments
pixelsstringplainpixels.xint- X.
yint- Y.
Returns
r, g, b, a or false.
Example
local r, g, b = dxGetPixelColor(dxGetTexturePixels(screen), 10, 10)
See also
dxSetPixelColorSets the colour of pixel (x, y) inplainpixels and changes the passed string. Images smaller than 4x4 are rejected.dxGetTexturePixelsReads the pixels of a texture, a render target or a screen source inplain,pngorjpegformat, whole or from a section (x, y, width, height). For example for a screenshot.