LiveSplit / livesplit-core

livesplit-core is a library that provides a lot of functionality for creating a speedrun timer.
https://livesplit.org/
Apache License 2.0
209 stars 56 forks source link

Support AVIF images #773

Open CryZe opened 4 months ago

CryZe commented 4 months ago

AVIF is now supported by all browsers and is generally the better format. We should look into supporting it and maybe even making it our default format. We'd need to have some compatibility support for the original LiveSplit though.

CryZe commented 4 months ago

Turns out that while there's pure Rust AVIF encoding, there's no AVIF decoding in pure Rust. That basically blocks the entire issue for now.

CryZe commented 2 weeks ago

I checked this out again, because it seems like rav1d is making decent progress. I was able to encode AVIF in the web version, where decoding isn't necessary anyway, because the browser will decode it for us. While there's definitely significant size wins, the encoding speed is really bad. Turns out that we can just bump the quality of the PNG compression that we do. While it doesn't get us to the compression level of AVIF, it still stays fast enough that I ended up merging that: #817