12 lines
351 B
Plaintext
12 lines
351 B
Plaintext
-- Creates a new image object of size 640x480 pixel and 32-bit color depth
|
|
img = image(640, 480, 32)
|
|
|
|
-- Fills image with plain red
|
|
img.fill(img.rect, rgb(255,0,0))
|
|
|
|
-- Gets the color value of the pixel at point (320, 240)
|
|
col = img.getPixel(320, 240)
|
|
|
|
-- Changes the color of the pixel at point (320, 240) to black
|
|
img.setPixel(320, 240, rgb(0,0,0))
|