Closed chrilith closed 5 years ago
OK this is already the case... was testing with a 24bit file sorry :)
Love this lib 👍
Hi, please use UPNG.toRGBA8() to convert any decoded PNG into RGBA 8-bit per channel.
UPNG.js guarantees, that the saved content would be the same (same width, height and color of each pixel), but it can not guarantee the same file size or internal representation (palette, grayscale etc.).
Hi,
Currently, decoding a PNG only returns a true color buffer, even if the file content is palette indexed.
It would be great to be able to optionally decide to get an array of color indices instead of an RGB array when there is a palette. And also get the Related palette of course!
It is important for me to keep the file intact when opening/saving back. Keeping depth etc.
Would this be possible?
Thanks! Chris