At this point AVIF vs JPEG XL is a more interesting discussion than anything vs HEIC.
It's pretty clear at this point that JPEG XL is a superior codec for e.g. photography. I think the question is going to be whether the browsers decide that it's worth supporting on the web, where lower quality images are the norm.
Some comparison images: https://afontenot.github.io/image-formats-comparison/#eaglef...
With progressive decoding, JPEG XL is also much a better fit for the web.
I just dont see how we continue to ignore JPEG XL and want to force AVIF adoption everywhere, when XL is technically superior, including encoding and decoding complexity. We literally have representatives from different companies and industries, most have been silent in the image / video codec format war begging for browser vendors to support JPEG XL.
But of course the cult and ideology somehow had people convinced the only accepted codec are AVIF, AV1 and Opus.
[1] https://twitter.com/jonsneyers/status/1563442356493230080
It's not really consistent, but at small sizes JPEG XL sometimes falls apart, especially if the image contains a lot of smooth textures and clean lines that are easily compressed by AV1. https://afontenot.github.io/image-formats-comparison/#air-fo...
I don't think you need any kind of conspiracy here, AV1 is an open codec after all. The problem is more that (a) AVIF has been around for longer, (b) browsers have to implement most of the spec anyway because they need to have AV1 support, and (c) the hardware decoding story for AVIF is probably going to be better for quite a while, given its closeness to video. AV1 is still a great codec, and Opus is best-in-class for general purpose audio.
Also, I agree with you that optimizing an image codec for high quality use cases is the ideal, but a lot of casual users prefer blurred images with missing detail to noticeable artifacts.
Note that there are samples where JPEG XL still has way too many artifacts at e.g. 1.3 bpp: https://afontenot.github.io/image-formats-comparison/#pont-d...
I do agree with you, though, that if a site is targeting 1.0 bpp or more, they're usually going to see better results with JPEG XL than AVIF.
> progressive decoding
If I'm not mistaken, it isn't enabled by default for JPEG XL and reduces the encoding efficiency by about 10%.
https://www.spiedigitallibrary.org/conference-proceedings-of...
Figure 1
This is excellent, and does indeed suggest that JPEG XL should be broadly preferred in the browser. Thanks for the reference.
TIFF is really a package format. It’s so flexible, that it’s damn near impossible to write a “full-fat” TIFF reader (I’ve done that. Never again).
TIFF is so flexible, that you can define an image to have a 6-bit R channel, and a 12-bit G channel, for instance. I think some medical or scientific images may have actually done that.
You can also have pretty much any type of compression that you want, for the image data.
But most people use TIFF to store uncompressed “raw” image data. These files can be crazy big, but also won’t have compression artifacts.
Meanwhile, PNG is always compressed, lossless.
https://libre-software.net/image/avif-test/
on two Linux machines with Firefox 105, and both showed the alt image text, so I guess maybe not, although it's showing up as enabled in about:config.
Edit: https://avif.io/ seems to work and display converted .jpg files, so maybe the first URL is old and doesn't work.
My browser seems to render AVIF just fine on Ubuntu and Manjaro, with Nvidia and Intel GPU backends. If it works with hardware acceleration on top of Nvidia's shitty drivers, I assume it'll work everywhere.
I've heard some old bug reports about colour management and AVIF not working together well in Firefox, that was the reason support had been baked in for a whole but the format was still locked behind a flag. I suppose they fixed that now that they enable the format by default.
HEIF doesn't work in any web browser:
I think Safari already supports using at least one actual video format as the `src` in an <img> element but it's weird to do so.
Safari for iOS 16.0 supports it now for still images. Safari for 16.1 apparently adds support for animated image sequences.
AVIF support comes to macOS with macOS Ventura.