Closed ehmry closed 2 years ago
The toPremultipliedAlpha <> toStraightAlpha are not lossless. We run into this problem as well. In the png decoder we have a "raw" Png
type that is lossless though. You might create a Qoi type that is losses and do most tests wit that. Then have the Image to Qoi conversation that does do the premultiplied alpha is another layer.
Done.
I don't understand the what the "sRBG with linear alpha" or "all channels linear" bit flag implies so I'm not doing anything with it.
I've not personally used the Quite OK image format, but I have heard of it and supporting it seems cool.
Pushed a new version with a Qoi
data type.
I was thinking we have enough image formats but after these NSO image parser exploits I can appreciate something that is designed to be simple.
Thank you for your PR! This is great.
If you want to add any other image formats let us know.
This great addition may also be mentioned in the README
https://qoiformat.org/
Not actually lossless when converting the test reference files. There is some sort of off-by-one shift during
toPremultipliedAlpha
andtoStraightAlpha
. I see alpha artifacts on the edges of testcard_rgba.png that are somehow missing from the Pixie roundtrip encoding.