X Media:getPixel

From GiderosMobile
Revision as of 05:31, 11 June 2023 by MoKaLux (talk | contribs)

Available since: Gideros 2016.1
Class: Media

Description

Returns r, g, b, a values of pixel at x,y coordinate (RGB are in range of 0 to 255, alpha is in range of 0 to 1).

(number), (number), (number), (number) = Media:getPixel(x, y)

Parameters

x: (number) x pixel coordinate
y: (number) y pixel coordinate

Return values

Returns (number) red value (between 0 and 255)
Returns (number) green value (between 0 and 255)
Returns (number) blue value (between 0 and 255)
Returns (number) alpha value (between 0 and 1)