-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Your Godot version:
4.5
Issue description:
The Image.set_pixel() function has the following signature :
void set_pixel(x: int, y: int, color: Color)
However, the image format can be of different types, including types like L8 with only luminance and no colors.
In that case, the pixel contains a single int, not a color. What do you put as the color parameter of set_pixel() then ?
After testing, it appears that you can still set a pixel's value on a L8 image using set_pixel, the R value provided will be used as the luminance value, while G and B will be ignored. (that's what seems to be after light testing)
I think this deserve to be better explained in the docs, as it does seem like a set_pixel_luminance() function is missing if you don't know how this function works.
URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/classes/class_image.html#class-image-method-set-pixel