Topic was automatically imported from the old Question2Answer platform.
Asked By
Weexer
I’m using aseprite for my 2d graphics. Right now I am working on user interface, and I wonder if I can control color Index from script, it would be pretty usefull
Not quite sure if this is what you’re asking for, but you can get a pixel via x and y:
var image = texture_normal.get_data()
Image.lock()
for row in image.get_height():
for column in image.get_width():
print(image.get_pixel(column, row))
image.unlock()
At this point, you have an Image with your edited pixels. If you want to draw it on screen using a sprite or a mesh instance, you can create an ImageTexture from it: