4 ms·
Accurate. My experience (as someone who has encoded a lot of both AVIF and JPEG XL images) is that JPEG XL tends to have superior detail preservation at medium
by bscphil 4y ago
Accurate. My experience (as someone who has encoded a lot of both AVIF and JPEG XL images) is that JPEG XL tends to have superior detail preservation at medium to high bitrates, as well as preserving grain significantly better at all bitrates. It's also slightly less prone to banding than AVIF, but more prone to noticeable artifacting on sharp edges, which only goes away at higher bitrates.
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/#eaglefairy&avif=l&jxl=l https://afontenot.github.io/image-formats-comparison/#eaglef...
- ryukoposting 4y agoAs a hobby photographer, this is a deeply interesting topic. I keep all my scans (yes, film still exists) as TIF files, but my clients don't know what to do with a TIF (and even fewer know how to tell a printer that the image uses a particular colorspace) so I usually send them the TIFs, plus some high-quality JPEGs. Why not HEIC/AVIF/etc? Because people know what a JPEG is.
- shmerl 4y agoWhy TIF vs for example PNG? Are there any benefits?
- ace2358 4y agoI’m under the impression that TIFF is lossless (like FLAC) while png is lossy (like ogg).
- bscphil 4y agoPNG is not lossy. However, it doesn't support metadata anywhere nearly as well as TIFF, so I still use that for lossless photography storage.
- ace2358 4y agoAh there you go! Didn’t know that :)
- vetinari 4y agoTIFF is a container. The payload it contains can be uncompressed, compressed losslessly with lzw//deflate/lzma/zstd, but it can also be lossy compressed with JPEG, WebP or even JPEG XL. Meanwhile, PNG is always compressed, lossless.
- LinAGKar 4y agoOgg is a container, you can have lossless FLAC in ogg.
- ace2358 4y agoI also didn’t know that! Thanks for letting me know
- ygra 4y agoAt least some camera raw files are also TIFF under the hood, e.g. Canon's CR2. TIFF also natively supports more than 8 bits per color channel, so you can still edit the photo and don't necessarily lose information in the process, whereas a single exposure adjustment on a PNG could lead to clipping and irrecoverable highlights or shadows.
- bscphil 4y agoDo you have any more information about this? I thought CR2 was floating point. Any details about how they store the mosaiced data in a TIFF would be very interesting, I assume.
- ChrisMarshallNY 4y agoEXIF is a TIFF file. I think most modern JPEG files are EXIF packages. A quick way to check, is to look at the first two bytes of a file. They are sort of a “BOM marker,” and will be either “II” or “MM”. 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.
- out_of_protocol 4y agoLossless jpeg xl could be a good choice for perfect archive copy, if needed. no idea about metadata though
- ksec 4y agoIn many categories of photos or images, JPEG XL [1] actually does better than AVIF in low bitrate settings. Which is the only advantage AVIF has over JPEG XL. And I am increasingly convinced that not losing details is the correct solution rather than smoothing things out in AVIF. 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 https://twitter.com/jonsneyers/status/1563442356493230080
- bscphil 4y ago> In many categories of photos or images, JPEG XL [1] actually does better than AVIF in low bitrate settings. 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-force-academy-chapel&avif=t&jxl=t 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.
- ksec 4y agoOne of the surprising fact from Cloudflare stats, was that most image on the web are actually 0.7bpp+ with the median being 1.0bpp. So image with 0.24bpp is surpassing small. And that is where progressive decoding works best, showing 0.3bpp image at launch while continue to download other details. There are problematic scenarios with JPEG XL, but I think a lot more could be optimised with encoder once they have 1.0.