AVIF can be more space efficient than JPEG at equivalent perceived quality levels. It also supports 10-bit per channel images.
I have a prototype branch implementing this format called avif
at https://git.sr.ht/~mstoeckl/grim/ . Unfortunately, in order to attain a significant space advantage over JPEG, one must use lower speed levels -- which are fairly slow. (On one test screenshot, speed 6 required ~2 CPU seconds, while speed 0 required ~50 seconds.)
It may be worth adding AVIF support, despite the slowness, if grim can be set up to write 10-bit screenshots; here JPEG is limited to 8-bit depth and PNG, being lossless, makes much larger files.
The AVIF branch currently preserves text much more accurately than JPEG, but this may be a consequence of write_avif.c
using 444 YUV subsampling instead of write_jpg.c
's 420 subsampling.
It's a bit quiet in here.