Open shssoichiro opened 7 years ago
See also pngquant https://pngquant.org/, compare algorithms for quality and compression
Of interest: https://richg42.blogspot.com/2022/01/lagrangian-rdo-png.html
@andrews05 Forgive me for not following this @ all (that math is way beyond me), but could you clarify whether this is lossy?
I don't understand exactly how it works myself, but yes it is lossy. RDO stands for Rate Distortion Optimisation.
I think lossy optimizations could belong to OxiPNG, but projects like e.g. pngquant are already pretty good at implementing color quantization in PNGs, and it would probably be more efficient to contribute to them, or make them easier to use in conjunction with OxiPNG, rather than reinventing what they do.
RDO is a very interesting technique I've never heard of before, and indeed that blog post is right that it has been neglected in the PNG scene, thanks for sharing! I have my doubts over what established PNG optimizer could implement it, though: pngquant
, as the name suggests, focuses on color quantization, while other optimizers focus on lossless optimizations, and as far as I know there is no PNG optimizer that is lossy but not limited to color quantization (very late edit: other than TruePNG's with its experimental lossy averaging pass, it seems).
Given this apparent focus on the lossy optimizers with color quantization, it can be wise for OxiPNG to offer something new and implement RDO, but in my opinion this is a pretty major decision that we probably should consult Josh on!
https://css-ig.net/articles/truepng.php