It would be helpful as in many simple games we use grayscale graphics only. Also, there are many elements(textbox, mask, etc) that use only black and white.
* Normal canvas needs 3 times more memory.
* 'la8' pixel format might be a good option(grayscale+alpha), but it can not be used in canvas - one could make imageData with la8 and use setPixel/mapPixel to draw on that, but it would be costly and cumbersome.
* 'r8' pixel format is available for canvas, but it is monochrome red(r, 0, 0) unlike la8(l, l, l, a). To my knowledge there is no way to turn this into grayscale(or monochrome of other tones) with setColor or setBlendMode, other than relying on shaders.
[Solved(Duplicate)] Is there any way to create 8bit-per-pixel grayscale canvas and draw on it?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 33
- Joined: Sat Jan 25, 2020 4:11 pm
[Solved(Duplicate)] Is there any way to create 8bit-per-pixel grayscale canvas and draw on it?
Last edited by qwdqwqwffqw on Wed Oct 09, 2024 2:25 pm, edited 1 time in total.
Re: Is there any way to create 8bit-per-pixel grayscale canvas and draw on it?
I asked pretty much the same question a few years ago. I guess the answer is still the same.
viewtopic.php?t=89381
viewtopic.php?t=89381
-
- Prole
- Posts: 33
- Joined: Sat Jan 25, 2020 4:11 pm
Re: Is there any way to create 8bit-per-pixel grayscale canvas and draw on it?
Oops, should have searched for 'greyscale' as well.
Thanks!
Thanks!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 20 guests