i am largely ambivalent towards the gif file format
@wyatt Completely reasonable position. What about png?
@kawa I like png, it's not perfect (see the animation fiasco) but i tend to use it when in doubt about what format to use. I like that (unlike webp and such) it's not possible to have either lossy or lossless PNG's; you know what you're getting with them.

@wyatt @kawa There have been a few attempts at "lossy PNG". One method, anticipated by the standard, involves reducing colors in a continuous-tone image to store it in indexed mode. The other involves adjusting pixels of 24-bit images to be better predicted by PNG's line filter, giving more zero bytes for DEFLATE to use

Indexed: https://pngquant.org/
Blurizer: https://github.com/kornelski/mediancut-posterizer/tree/blurizer

#png #LossyPNG #pngquant #ImageCompression

pngquant — lossy PNG compressor

@PinoBatch @kawa yeah i've seen stuff like that, but as i understand it you're still ending up basically "preprocessing" the image before feeding it into a more conventional encoder, rather than having the encoder inherently lose data.
although also you could write an encoder that does this preprocessing as part of the encoding stage, which does render things a little more ambiguous. "Where does the preprocessor end and the encoder begin?" and that kind of thing.
pngcrush and zopfli (i think) have functionality like this.