Topic was automatically imported from the old Question2Answer platform.
Asked By
Charles Woodhill
Old Version
Published before Godot 3 was released.
hi,
how to change a pixel of an image?
Image::put_pixel, get_pixel seems to be deprecated.
is there an alternative?
(c++)
(EDITED)
I don’t see a clear way of doing it in the current Image class (Godot 3.0), and it’s certainly because it can have multiple formats (RGBA 8 bit, RF float, RGB 8 bit…).
So I would like to know what’s the best way to set individual pixels on that too.
Zylann | 2017-03-25 20:58
So no way to edit an image or texture anymore?
Because i used it to manipulate a texture at runtime,
needed this to change my splatmaps alphaTexture in my terrain.
EDIT: I will give it a try tomorrow, maybe i can hack something out of the old one
also get_pixel vanquished
Charles Woodhill | 2017-03-25 22:34
In theory using GPU painting (basically drawing stuff on a render texture) instead of CPU painting could be a way to paint on the splatmap too, but I’m not sure how easy it is with the current Godot API.