Closed Speykious closed 1 year ago
PNGs are slightly lossy when it comes to transparency, hence we label it as lossy. Same transparency artefacts do not appear in TGA.
Apparently it might be a bug in our PNG decoder or multiple encoders
Oh, interesting
I just got this in my inbox and thought it might be interesting to comment on it. PNG is completely lossless. Photoshop native PNG exporter it's limited and it clears the pixels of the alpha channel. But this is a limitation of Photoshop more than PNG itself. If you save files as 16 bits instead, this doesn't happen so much at all. I do recommend, however, looking into SuperPNG exporter for Photoshop as it allows to export PNG files with a completely separated alpha channel (32 bits) instead of transparent pixels (24 bits).
So my whole point is that, yes, PNG are completely lossless files and they support a higher bith depth than TGA.
Text has been updated to say Lossless, though we'll need to investigate further whether the semitransparent pixels losing info thing is a exporter or importer problem.
Maybe there are some blending problems there?
You can greatly improve the quality of rendering if you do it right. You will most likely want to deal with linear color space and premultiplied alpha.
https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/ https://www.adriancourreges.com/blog/2017/05/09/beware-of-transparent-pixels/ etc...
PNG is absolutely lossless. The problem may be in how this data is interpreted. And also what data is written there.
Fixed in the doc page at https://docs.inochi2d.com/en/latest/i2d/spec/inp.html#texture-encoding
In the Inochi2D wiki, on the INP Data Interchange format page, it says that PNG is lossy, but it is actually lossless.