From 953bdbdd5e92972cc0bcbd7678b4e514b6d6f2c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lumi=C3=A8re=20=C3=89lev=C3=A9?= <88174309+PoneyClairDeLune@users.noreply.github.com> Date: Thu, 18 Jul 2024 09:35:37 +0000 Subject: [PATCH] Revoked AVIF lossless recommendation. --- src/ltgc/encode.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ltgc/encode.md b/src/ltgc/encode.md index 8b97218..329e297 100644 --- a/src/ltgc/encode.md +++ b/src/ltgc/encode.md @@ -77,6 +77,8 @@ Things to take notice of: * mozJPEG-fronted JPEG, while offering a good choice for backwards-compatibility, shouldn't be used unless necessary when size is a consideration. * AVIF offers an advantage on size, when progressive support, boundary artifacts and codec performance (slower than all others multiple times) aren't in consideration. +* AVIF is observed to have fewer observable artifacts for images with a simpler shading. +* The reference AVIF settings provide a balancing point between JXL -d 1 and JXL -d 2.
@@ -87,16 +89,16 @@ Things to take notice of: - + - + - + - + @@ -119,10 +121,15 @@ The full feature set comparison chart is [available on Cloudinary](https://res.c ![Battle of the image codecs!](https://res.cloudinary.com/cloudinary-marketing/image/upload/w_700,c_fill,f_auto,q_auto,dpr_2.0/Web_Assets/blog/Battle-of-the-Codecs_fnl.png) ### Lossless still -AVIF is the current best solution for lossless image encoding, with JPEG XL tailing behind. If size is the bigger factor, choose AVIF lossless. If compatibility is a concern, choose WebP lossless. JPEG XL in its current state doesn't offer much advantage against AVIF. +JPEG XL lossless and WebP lossless are mostly on par, either could be the better solution at times. For compatibility reasons, WebP lossless should always be offered, while JPEG XL lossless could be offered only when the resulting file is smaller than that of WebP lossless. AVIF lossless is currently consistently worse than either JPEG XL or WebP, as such it's not recommended at all. Do *not* enable progressive encoding for JPEG XL lossless, or the resulting file will be several times bigger than PNG files. +| Codec | Parameters | +| ----- | ---------- | +| JPEG XL | `cjxl -j 0 -d 0 -e 7` | +| WebP | `cwebp -m 6 -lossless` | + ### Lossy animated Lossy animated WebP is the current baseline for animated image sequences, while lossy animated AVIF offers the best quality against others by a wide margin. Lossy animated JPEG XL doesn't offer a significant advantage against WebP, and is currently beaten by AVIF.
JPEG XL Delivery (quality)cjxl -d 2 -e 7 -pcjxl -j 0 -d 2 -e 7 -p --progressive_dc 1
Archival (quality)cjxl -d 1 -e 7 -pcjxl -j 0 -d 1 -e 7 -p --progressive_dc 1
Delivery (speed)cjxl -d 2 -e 4 -pcjxl -j 0 -d 2 -e 4 -p --progressive_dc 1
Archival (speed)cjxl -d 1 -e 4 -pcjxl -j 0 -d 1 -e 4 -p --progressive_dc 1
WebP Delivery (perception)