-
Notifications
You must be signed in to change notification settings - Fork 0
Image
firstmiddlelast edited this page Aug 26, 2023
·
1 revision
-
width, read-only. The width of the image. -
height, read-only. The height of the image. -
stride, read-only. The number of bytes per image row. -
format, read-only. The PixelFormat of the image. -
getPixel (x, y), reads a color from the given coordinate of the image.- Argument:
xinteger - Argument:
yinteger - Returns: a color value
- Argument:
-
putPixel (x, y, color), writes the color onto the image at the the given coordinate.- Argument:
xinteger - Argument:
yinteger - Argument:
colora 32-bit color in 8888 RGBA format.
- Argument:
-
clear (color), clears the image with the specified color.- Argument:
colora 32-bit color in 8888 RGBA format.
- Argument:
-
putImageData (data), writes the given pixels onto the image. Must be the same size as the image.- Argument:
dataAll of the pixels in the image.
- Argument:
-
getImageData (), creates an array containing all of the image's pixels.- Returns: All pixels in an array (Lua) or a Uint8Array (JS)