Page 1 of 1
Add support for AVIF
Posted: Mon May 03, 2021 2:47 pm
by alexman91
please allow the game to use avif its much more efficient and smaller.
my mod folder is taking up 4gb of png files this can be reduced by 70% with avif.
there are batch apps to convert all png to avif lossless
Re: Add support for AVIF
Posted: Tue May 04, 2021 6:36 am
by ssilk
Doesn’t make much sense, because it needs to be unpacked when loading, which takes up some more time. Then it seems to be a non-loseless kind of compression which is bad , because in Factorio every pixel counts. And unpacked into memory the images have the same size, because that’s what’s done to make the graphics fast... I would mean the prize for 3 GB on your hard disk is much cheaper, than these disadvantages.

Re: Add support for AVIF
Posted: Tue May 04, 2021 11:43 am
by ptx0
alexman91 wrote: ↑Mon May 03, 2021 2:47 pm
please allow the game to use avif its much more efficient and smaller.
my mod folder is taking up 4gb of png files this can be reduced by 70% with avif.
there are batch apps to convert all png to avif lossless
4gb of disk space is a problem? it is not 1998
Re: Add support for AVIF
Posted: Tue May 04, 2021 4:33 pm
by coderpatsy
ssilk wrote: ↑Tue May 04, 2021 6:36 am
Then it seems to be a non-loseless kind of compression which is bad , because in Factorio every pixel counts.
As mentioned in the OP, AVIF does have a lossless mode. I've no clue about unpacking time/memory so your other points probably still stand though.
Re: Add support for AVIF
Posted: Wed May 05, 2021 2:15 am
by ssilk
Avif sucks hard for lossless compression.
See
https://jakearchibald.com/2020/avif-has-landed/ (-> flat illustration)
If that’s all true, then lossless WebP seems to perform better. But for these 10-20% - I don’t know if that makes sense.

Re: Add support for AVIF
Posted: Wed May 05, 2021 7:51 pm
by ptx0
ssilk wrote: ↑Wed May 05, 2021 2:15 am
Avif sucks hard for lossless compression.
See
https://jakearchibald.com/2020/avif-has-landed/ (-> flat illustration)
If that’s all true, then lossless WebP seems to perform better. But for these 10-20% - I don’t know if that makes sense.
generally the tradeoff is in the size vs performance. better compression is going to be slower both in decompression and compression. so, you'll sacrifice load times.
overall a bad idea for no gains