Using ImageData:setPixel for non rgba8 ImageData types
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 2
- Joined: Sat Dec 07, 2024 12:22 pm
Using ImageData:setPixel for non rgba8 ImageData types
Currently im using an imagedata object to store the state of a grid in my game, and the most convenient way for me to do this is by using the "r8" ImageData type. How do I use the setPixel method when it expects r, g, b and a parameters, but my ImageData object only needs an r argument? Thanks
Re: Using ImageData:setPixel for non rgba8 ImageData types
It needs all the parameters and the underlying implementation ignores the superfluous ones if necessary.
-
- Prole
- Posts: 2
- Joined: Sat Dec 07, 2024 12:22 pm
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 7 guests