268 points farlight 18 hours ago 184 comments
shmerl 18 hours ago | parent
JPEG XL doesn't have that benefit, while sites adoption is arguably a worse issue than browser adoption.
To demonstrate the point even for AVIF itself - it has been in the browsers for a while. Can you use it on common sites? Good luck if you can, even major sites like GitHub and GitLab have issues with it due to some site code depending on hardcoded list of known formats or other similar problems.
pornel 18 hours ago | parent
ISO-BMFF container is bloated and needlessly complicated. AVIF decoders didn't even want to reuse existing MP4 libraries for it due to all the baggage it brings, and implemented their own minimal parsers.
AVIF would have been better off with a simple wrapper similar to RIFF/PNG or extending AV1's own OBU header (which for inexplicable reason gets its data duplicated inside the HEIF container and then implementations are required to verify that both copies agree!)
I hope AVIF will skip AV2. We don't need yet another almost-identical format to migrate to.
arendtio 18 hours ago | parent
pwg 17 hours ago | parent
With no codec for a new compression algorithm, it does not matter if the browser can read the container, you still see the "broken image" icon on your display.
shmerl 17 hours ago | parent
ksec 14 hours ago | parent
shmerl 13 hours ago | parent
You as user can then upload AVIF images to wherever images on the site are processed. And after that, let's say when newer codec inside AVIF will get a good browser coverage, you'll be able to start using it without waiting another decade for GitHub to pipe it through their site code.
For formats without a container, it's always a two step process. Browser coverage first, then another huge period of sites support catching up.
theandrewbailey 17 hours ago | parent
Many other image formats are. AVIF uses HEIC, the same container that HEIF does.
> when AV2, AV3 etc. will come out, there won't be a need to go through another very difficult phase of sites adoption - it will still be AVIF just with newer codec inside, and it will be just up to browsers to catch up on newer versions and newer codecs will address technical needs as times goes.
Fingers crossed, but AV2-based AVIF specs haven't even been finalized, so who knows.
jaffathecake 17 hours ago | parent
shmerl 17 hours ago | parent
jaffathecake 17 hours ago | parent
shmerl 14 hours ago | parent
quentindanjou 18 hours ago | parent
Overall I am getting that AVIF is better on the web...unless Lossless is needed, in that case better take JPEGXL.
dc3k 18 hours ago | parent
phoronixrly 18 hours ago | parent
lern_too_spel 18 hours ago | parent
F3nd0 3 hours ago | parent
0xy 18 hours ago | parent
adzm 18 hours ago | parent
jaffathecake 17 hours ago | parent
adzm 18 hours ago | parent
So, is animated AVIF only keyframes / p-frames, where each frame is independent from the other? I was under that impression, uncertain if there are any other capabilities it might have (like only updating part of the canvas when only parts change, like GIF supports)
jaffathecake 18 hours ago | parent
adzm 18 hours ago | parent
lern_too_spel 17 hours ago | parent
jeffbee 17 hours ago | parent
CodesInChaos 14 hours ago | parent
usef- 12 hours ago | parent
farlight 2 hours ago | parent
Try it: run cjxl › djxl and hash the output against the original.
Zardoz84 1 hour ago | parent
lern_too_spel 11 hours ago | parent
Theodores 17 hours ago | parent
I am still on webp, thinking that I am on the bleeding edge in a world where artworkers are obsessed with pixels with JPG/PNG as the only formats they know, which is an advance on GIF.
Every browser advertises what formats it will accept and if it is in 'data-saving, low bandwidth mode', so I just configure the CDN to keep the names the same '.jpg' but to send the bestest format for the situation/browser, whether that be webp or AVIF, fetching super-high resolution files from the origin server, outputting them in 'retina' resolution with none of those 'picture' elements referencing half a dozen 'responsive' sizes.
In this way nobody has to care what image format is being served, and if it is deemed that everything is way too compressed, the CDN can be flushed of the cached images, quality increased, and cache rebuilt.
It looks like I will need to update my server configuration to use JPEG XL in the usual five years' time, given the lack of any revolutionary benefit.
jaffathecake 17 hours ago | parent
I was at Google for 10 years, then went to Shopify for 2 years, but I missed the web. For most of the time I was at Google, it mostly did what was good for the web, rather than pushing Google's interests, but that started to change, which is one of things that led to me leaving. E.g. see what happened with the Prompt API.
bitpush 17 hours ago | parent
jaffathecake 17 hours ago | parent
throw0101c 17 hours ago | parent
bitpush 17 hours ago | parent
pwg 17 hours ago | parent
venusenvy47 14 hours ago | parent
ksec 14 hours ago | parent
Think of it as zip compression that is specially designed for JPEG and putting the JPEG data in a different/better container.
adrian_b 16 hours ago | parent
JPEG-XL seems to be the best solution for storing and distributing high-quality images. For myself, I want high-quality images, so JPEG-XL is what matters, both for new images and for compressing the old archives of JPEG images.
While I have my own Web server, it is for private use and not for commercial purposes, so I have no interest in using AVIF to achieve the smallest image sizes, but at a lower quality than I want.
jaffathecake 16 hours ago | parent
adrian_b 16 hours ago | parent
And the article supports what I have said.
Quotation from the article:
> But JPEG XL catches up at very high quality. Around SSIMULACRA2 85, libjxl's default matches AVIF's default, and at maximum efforts, jixel 'extraslow' is ~6% smaller than AVIF s0. jixel 'slow' is 10–13% smaller than AVIF's default from SSIMULACRA2 80 upwards.
JyrkiAlakuijala 14 hours ago | parent
ssimulacra2 85 is rather close to median quality in the internet
ssimulacra2 90-95 is rather close to high quality in the internet
ssimulacra2 98+ is close to camera quality
jaffathecake 14 hours ago | parent
Gigachad 8 hours ago | parent
JPEG XL is the ideal high end photography format. AVIF seems better for a space efficient web format.
Evidlo 5 hours ago | parent
jaffathecake 5 hours ago | parent
zbobet2012 5 hours ago | parent
Gigachad 3 hours ago | parent
kps 15 hours ago | parent
For a wide variety of usecases, not for every isolated usecase. Today, AVIF is better for showing people ads^W^W^W web content delivery. This article is titled “JPEG XL vs. AVIF for web use-cases”. The other article recently discussed¹ is subtitled “Investigating JPEG XL's place as a Web image codec” and ends:
> JPEG XL isn't useless; it is genuinely compelling technology for use cases beyond the Web.
¹ https://news.ycombinator.com/item?id=49690554
(Either way, can we agree to take webp out behind the barn?)
ksec 14 hours ago | parent
JPEG XL has always been targeting high quality encoding metric first before the lower end low BPP images, which AV1 excels at with or without the last 6 years of improvements.
The current top comments about MP3 and LAME is again about how encoder extract maximum potential. JPEG XL was may be the best in 2021, but has been fighting for survival since then.
There a lot of different images that JPEG XL encode better. Screenshots with text is known to be not something they have optimised for or think it could be good at. Lossless mode may be better. Edit: As one of the other comment here proved my point.
Had all of these, even just a hint of AVIF improvement be told, may be the sentiments would have been a little different. But then again I am not one who would trust the same people who sold me WebP and AOM roadmaps.
But at least AV2 is coming. And JPEG XL is finally in every browser. Hopefully we can all have something even better in the future.
mdasen 14 hours ago | parent
JPEG XL also has some big benefits for many use cases like lossless re-encoding and supporting higher resolution. AVIF images have a max size of 8192x4352 last I checked. That's not a problem for web images almost all of the time, but there's certainly uses where you might want more. I think AFIV might be limited to 12bit overall while JPEG XL can do 32bit. Again, is that something many will take advantage of on the web? No, but if it's something you care about it might be really meaningful to you.
Also, if you care about the 90% quality level, JPEG XL often outshines AVIF, but when I'm putting images on the web it's often well below that.
Some of it was bad information. I saw some people saying JPEG XL being way less computationally intensive (even less than WebP) and offering much better compression. Some of it was selective data - do you only test things at 95% quality level and declare a winner?
But I think the big thing is that a lot of people wanted the two formats to succeed or fail based on their merits. I think a lot of people don't like AVIF because it isn't well supported outside of browsers - and there can be a hope that the JPEG name would mean JPEG XL would get the kind of adoption JPEG did.
And it's hard to truly compare formats - or benchmark in general. As the article shows, different JPEG XL encoders offer vastly different performance. And when we're dealing with lossy compression, sometimes it can be a bit of personal preference. At some point, people started enjoying the way that MP3 garbled symbols (the instrument) and that was the sound they expected a symbol to make.
jaffathecake 14 hours ago | parent
This isn't true btw. The format supports up to 64k x 64k, although browser decoders currently fail beyond 16k x 16k.
Not sure when you'd serve something like that on a web page though.
pixelesque 13 hours ago | parent
If I reduced the res a bit, then it worked, so there did seem to be a limit there somewhere. height and width are stored as u32s internally though, so yes, the format itself technically supports it...
I never looked into it more, so might have been a libavif issue, or maybe the way I was using it (maybe it has defaults or profiles?)
gary_0 11 hours ago | parent
https://aomediacodec.github.io/av1-avif/#profiles
I'm assuming if both the encoder and decoder support more than the baseline profile, then higher resolutions up to 64k x 64k are possible, although I would worry the file would be incompatible with some software.
F3nd0 3 hours ago | parent
As the article points out, this might change yet again in the future, depending on how much AVIF keeps improving and whether JPEG XL development picks up steam again and how far it’ll go.
throw0101c 17 hours ago | parent
braiamp 17 hours ago | parent
jaffathecake 17 hours ago | parent
IE never supported AVIF. Edge even shipped AVIF later than Chrome. One of the leaders of JPEG XL worked at Google until relatively recently. A massive amount of JPEG XL development has been done by a team at Google.
F3nd0 4 hours ago | parent
PaulHoule 17 hours ago | parent
Granted, AVIF performs impressively for, say, a huge hero image for a blog where you're out to create an overall impression and people aren't going to look at it closely. It does not impress me when I am compressing photos I took with my mirrorless and I expect them to look like photos taken with a mirrorless and not cell phone snaps.
dfabulich 17 hours ago | parent
jaffathecake 17 hours ago | parent
buzer 17 hours ago | parent
That's what I noticed anyway, not a car or photo guy either.
jaffathecake 16 hours ago | parent
buzer 16 hours ago | parent
jaffathecake 15 hours ago | parent
boogerlad 17 hours ago | parent
PaulHoule 17 hours ago | parent
https://jakearchibald.com/2020/avif-has-landed/demos/compare...
I was talking about. He linked another one! Guess people finally realized that one sucks and now they have a new one. I screwed up.
jaffathecake 17 hours ago | parent
debazel 7 hours ago | parent
jaffathecake 17 hours ago | parent
You're looking at it in a browser that doesn't support JPEG XL, so it's falling back to a WASM renderer, and I think it handles resizing differently.
This is totally my bad. I thought I was doing a good thing by adding that fallback renderer, but it isn't identical and it's giving people the wrong impression.
The lossless version is JPEG XL, hence the difference to AVIF.
eviks 16 hours ago | parent
jaffathecake 16 hours ago | parent
D2OQZG8l5BI1S06 15 hours ago | parent
jaffathecake 14 hours ago | parent
bigstrat2003 11 hours ago | parent
jaffathecake 8 hours ago | parent
CodesInChaos 14 hours ago | parent
mkesper 13 hours ago | parent
fngjdflmdflg 17 hours ago | parent
This is something I've felt doesn't get enough attention when comparing JXL and AVIF. AVIF can be the replacement for GIF.
><video muted autoplay> is right there.
>No, I'm not adding a demo. I don't want it on my server. Use video formats for video.
I'm not sure if "Use video formats for video" is saying to use AVIF over JXL or saying to use AV1 over AVIF. If the latter, GIF-like animations have a different enough user expectation that it makes sense to have it as something different from regular videos. Even <video muted autoplay> doesn't encode the full expected behavior because GIFs are not expected to have controls like pause, play and scrub. And even if you hide the controls users will expect similar behavior when opening it in an image viewer or in a new tab. Images do not have controls so they fit better as an image, although maybe they need their own category.
Also, I didn't realize how good AVIF was at progressive rendering. I don't think I knew it could do that at all. I think AVIF is the clear winner for the web, although it is still nice to have JXL for lossless. Somehow I feel that AVIF still hasn't gained as much usage as it should, especially now that it is supported almost everywhere. I think I see more webp than AVIF, and JPEG is still everywhere. Maybe now that JXL is out, developers will take another look? AVIF is supported by 96.35%-98.83% of browsers according to caniuse whereas webp is 97.18%-99.68% and JPEG is 97.28%-99.78%.
I also didn't know there was a Rust JXL encoder named jixel.[0]
eviks 17 hours ago | parent
Though given the lagging speed in decoding, is there a faster tying JXL decoder planned?
Dylan16807 16 hours ago | parent
javier2 17 hours ago | parent
2. Is it possible to encode AVIF with hardware acceleration?
jaffathecake 17 hours ago | parent
When it comes to hardware encoders, the nicest thing you can say about them is they're fast. Software tends to do way better at quality. Hardware AV1 encoders will be tuned for video rather than stills.
yhjc2692 17 hours ago | parent
It's hard to rigorously judge a codec from a handful images, especially given the large impact they would have (with a widely adopted codec encoding bazillions of images in the coming years).
* There are many intricate details that go into codecs and visual perception. For instance, our sensitivity to visual errors are dependent on colors (all of hue, saturation, and brightness), spatial frequency of artifacts, local contrast and texture presence, et cetera.
And like OP mentioned, perceptual error metrics (including SSIMULACRA2) aren't perfectly representative of human-evaluated visual quality. For instance, libjxl deliberately makes choices that hurt SSIMU2 scores, but improve human-rated quality.
jaffathecake 17 hours ago | parent
But yes, you can see this with jixel, which I'm really impressed by, but it's so tuned to SSIMU2 that it looks really bad to human eyes in some cases compared to libjxl.
yhjc2692 17 hours ago | parent
Maybe the first step to designing better encoders is to build an extremely accurate visuoperceptual error metric. Seems like ML's rapid progress haven't caught onto it just yet.
janwas 16 hours ago | parent
yhjc2692 14 hours ago | parent
Seems like others were curious too, given the Wikipedia page on Guetzli mentions:
> Butteraugli. ... How the hundreds of parameters that model the properties of the human visual system were derived remains unexplained.
My rough understanding is its multi-scale convolution architecture was inspired by biological visual perception (perhaps how the layers of visual cortex gradually represent higher level features, ish), and involved some sort of empirical parameter tuning based on human evaluations. It'd also be a very nice resource for beginners wanting to learn more about image/video codecs (like me :)
eviks 16 hours ago | parent
But that is correct and why any proper study should first train the participants on the type of artifacts and trade-offs. Like the reference to JXL choices: think its creator mentioned that AVIF might look nicer for faces because it was "smoothing" them but it was a worse representation of the original. So the study participants would need to be conscious of that trade off and be clear in terms of what they're asked to evaluate - whether the result looks nicer or whether it represents the original better.
yhjc2692 16 hours ago | parent
Perhaps we can use clever experiment design to address it, like doing a "full-reference" evaluation (e.g., pick most similar two images, out of encoder A, encoder B, and original) rather than strictly A/B.
jaffathecake 16 hours ago | parent
janwas 16 hours ago | parent
ksec 14 hours ago | parent
F3nd0 3 hours ago | parent
Klaus23 17 hours ago | parent
jaffathecake 17 hours ago | parent
F3nd0 4 hours ago | parent
Not to call into question the article’s author’s expertise, just to point out that they are a single individual and not an authoritative source (which you haven’t implied, but some people might read that way).
theandrewbailey 17 hours ago | parent
After reading this article, there's something to point to prove I'm not going crazy.
lofaszvanitt 17 hours ago | parent
jaffathecake 16 hours ago | parent
lofaszvanitt 14 hours ago | parent
yhjc2692 17 hours ago | parent
libjxl's slow speed at efforts >7 is primarily due to an iterative evaluation-optimization loop of a perceptual error metric called Butteraugli (by tuning quantization weights). This, as well as some other computations in libjxl encoding, happen to be data-parallel and run faster on GPUs than multicore CPUs.
In case anyone is interested, I've been working on a GPU-accelerated libjxl port (supporting CUDA and Metal for now) that makes this much faster, closer to libjxl's normal speeds: https://github.com/yunho-c/gjxl - geared for encoding a large batch images into JPEG XL. It's also faster by around 2.9x at normal effort (7).
eviks 17 hours ago | parent
(also like the BPP size metric that is picture size-independent)
Wish that widget with improvements (that allows comparison of 3 pics with 3 buttons: original/codec1/codec2) were the widespread standard (also, "hold" is a rather unergonomic action)
Otherwise, seems like AVIF has had impressive gains in both speed and quality, wonder whether JXL could catch up
jaffathecake 16 hours ago | parent
eviks 15 hours ago | parent
jaffathecake 13 hours ago | parent
The images in the article max out at the maximum size I'd want them displayed.
networked 15 hours ago | parent
eviks 15 hours ago | parent
Metricon 16 hours ago | parent
ffmpeg -i {input_file} -filter_complex "[0:v]format=pix_fmts=yuva444p,split[color][alpha];[alpha]alphaextract[alpha_chan]" -map "[color]" -map "[alpha_chan]" -c:v libaom-av1 -crf 25 -cpu-used 3 -still-picture 1 -aom-params "sharpness=2:enable-chroma-deltaq=1:arnr-strength=0" -color_range pc -colorspace bt709 -color_primaries bt709 -color_trc bt709 {output_file}jaffathecake 16 hours ago | parent
Metricon 16 hours ago | parent
jaffathecake 16 hours ago | parent
Metricon 16 hours ago | parent
theandrewbailey 15 hours ago | parent
https://github.com/aomediacodec/libavif
avifenc supports args like enable-chroma-deltaq. I've used those but recently stopped, and nothing substantial changed.
est 8 hours ago | parent
jaffathecake 5 hours ago | parent
LewisOrton 14 hours ago | parent
Metricon 13 hours ago | parent
Otherwise the massive size reduction for storage and transfer speeds makes it incredibly attractive for modern web applications.
LewisOrton 13 hours ago | parent
IshKebab 16 hours ago | parent
usef- 11 hours ago | parent
est 8 hours ago | parent
jaffathecake 4 hours ago | parent
Adding formats to the browser gives us more code to maintain, increases the binary size, and increases the attack surface area. That's why, at Firefox, we insisted on a Rust decoder.
est 3 hours ago | parent
In that case, don't nanny everything as a monolith. Let formats/codecs can be installed as extension/plugin.
For example I really want to webrtc to f' off, I can't. I can't even disable it for a particular site like microphone permissions. It sucks!
And to my knowledge, webrtc stack is so much more complicated than an image format, so many sites trying to grab my private IP using webrtc. yet every browser vendor are happy to support it!
jaffathecake 2 hours ago | parent
est 1 hour ago | parent
There are dozens of .wasm based image encoder/decoders outthere, no?
It's not like it could access network or IO, unlike extensions do, which could steal your data after authors sell their popular extension and buys profits from stealing data from installed users.
F3nd0 3 hours ago | parent
AVIF uses the AV1 codec. For the past several years, AV1 has been enjoying a wide interest and a continuous stream of improvements as the best, open, royalty-free video codec around that pretty much everyone had agreed to support from the get go.
JPEG XL started out with a smaller group behind it and took a massive hit when Google decided not to support it in Chrome (and by extension, the entire web, because market share). That made JPEG XL’s future as the universal format very uncertain for a few years. Excitement waned, development slowed down and was further divided to develop a new encoder which Mozilla later said they wanted.
So for a good while, AVIF was steadily improving and approaching its full potential, while JPEG XL was not. The article compares the current state of the current encoders; in no way does it indicate how good the formats themselves are. The article makes note of this. [2] It’s been known for years that JPEG XL compression can still be improved by quite a bit, so I imagine the current encoders are still far from reaching the format’s full potential. (Heck, they don’t even make use of all its features from what I know!) Back when it was first proposed, JPEG XL was very competitive. With interest in the format hopefully renewed, we might see it catch back up with AVIF and overtake it again. Or we might not. We have no way of knowing for sure right now.
[1]: https://news.ycombinator.com/item?id=50128587
[2]: https://jakearchibald.com/2026/jpeg-xl-vs-avif/#:~:text=Both%20AVIF,in%20futureDylan16807 16 hours ago | parent
What optimizations are being added? I thought it was basically the exact same codec, but different packaging and usually some adjustment to how the encoder is tuned.
jaffathecake 15 hours ago | parent
superkuh 16 hours ago | parent
usef- 11 hours ago | parent
aadharshpan 16 hours ago | parent
It does seem like AVIFs win on small images, and JXL gives you progressive rendering, easy upgradability on JPEGs, and better lossless and high bitrate images.
usef- 11 hours ago | parent
It does sound like the remaining areas jpegxl is better at are almost all non-web use cases.
moecables 16 hours ago | parent
ezst 15 hours ago | parent
I also remember the big claims about WebP's superiority, which ended-up in practice, at equivalent file-size, mostly trading away some of the JPEG artifacts that we all know for some unusual new ones.
I don't think there's a large-enough margin in this space that a new format could chew into to make the general public care: image compression seems like a solved problem overall. The second best thing is to come-up with a format that can make the content producers not have to care either, i.e. be the best in class or close-enough in a variety of use-cases (lossy, lossless, fast, animated, hdr, progressive, …). My naive impression was that jxl is mostly interesting in that regard.
tormeh 14 hours ago | parent
to11mtm 9 hours ago | parent
RAW can be it's own entire nasty^nasty rabbit hole. The sorts of stuff that honestly do make me wonder if certain raw formats have their own unique ways of exposing vulnerabilities in accepted ways of implementing.
Things that come to mind are;
- Compressed RAW images. Both the lossless and lossy variants, esp because every manufacturer does their own thing, well except maybe MFT[0], buuuut;
-For MFT, my understanding is that the RAW doesn't just contain some info for LR/C1/DPL[1] or any other sufficiently implemented processing tool to apply correction data (again, I could be wrong, but I think that is something that the Micro 4/3 format does.)
[0] - Micro 4/3
[1] Light room, Capture One, DXO PhotoLab (FKA DXO OpticsPro)
mikae1 6 hours ago | parent
MFT is a sensor size and lens mount, not a raw file format. Panasonic and Olympus (among others) have made cameras using this standard, but use different raw file formats.
Aachen 14 hours ago | parent
What improvement do you think is necessary for people to care?
Genuinely curious. Spoiler link with my answer to avoid any bias: https://lgms.nl/p/cau/?b64&ZVRNb9QwEL0j9T%2BMKqFtpe1Cqcq9qoT...
abanana 13 hours ago | parent
It means the technical differences between format, and the real-world choice of which file you want, don't match.
throwaway2046 8 hours ago | parent
I have tried doing that with curl/wget but have been unsuccessful, websites still serve webp even when the original URL ends with .jpg or .png... Could you explain how you do it?
thayne 6 hours ago | parent
linolevan 14 hours ago | parent
- The Firefox screenshot w/ lossless JXL at 66.9kB, when with a better encoder you get get it down to like 40.7kB (39% smaller) [1] (or 43kB if you need it to work with jxl-rs [2])
- The cat illustration w/ lossless JXL at 255.3kB, when with a better encoder you can get it down to 178kB (30% smaller) [3]
[1] https://www.linolevan.com/05-screenshot.jxl
yhjc2692 14 hours ago | parent
Aachen 14 hours ago | parent
ksec 14 hours ago | parent
Curious what is the better encoder here referring to?
jaffathecake 14 hours ago | parent
jaffathecake 14 hours ago | parent
shevy-java 14 hours ago | parent
For me personally, AVIF is still better, for various reasons (not solely file size compression ratio as such, though this is my number one go-to objective; browser support is also useful but to me is not so important as it is).
I am keeping a close eye on JPEG-XL, but right now I am quite settled on .avif. All my local collection is in .avif, when before it was a mixture of .jpg, .png and a few animated .gifs. From my findings a few years ago, avif is superior to jpg, png and gifs on pretty much everything it matters. On very high compression, though, I also noticed artefacts, but we had that even more so with jpg, and for 1:1 comparable file size, avif beats jpg with both eyes closed.
By the way, great article. I hope he can do another review, based on that blog entry, in, say 3 years. Would be interesting to see how avif and jpeg-xl have improved. In all likelihood I will still keep on using avif, but if jpeg-xl is a real winner in some areas, I may use it. (Lossless is one area where jpeg-xl excels, but I don't need to store satellite data; I want to store old family pictures in an efficient manner, and here it seems avif is better.)
CodesInChaos 13 hours ago | parent
In full screen mode, the "hold for lossless" version "Firefox help"/"Submit feedback" are not underlined. In inline mode they are. Both modes seem to render a scaled down version of the image, which seems to cause these problems.
watersb 13 hours ago | parent
Text has lots of edges, hard transitions between bright and dark areas. So text requires lots of high-frequency detail, and JPEG adds a lot ringing as it bounces off all those lines and curves.
AVIF seems to follow contours, so it does a good job with line art.
Otherwise, it's hard to beat the Mozilla JPEG encoder.
JPEG XL can represent lossless images that exceed the limits of human vision. I don't expect it to replace FITS for astronomical images, but the future is weird.
(Super huge thanks to Jake Archibald for the SVGOMG web app. Which is also fantastic for line art.
https://jakearchibald.github.io/svgomg/
Squoosh is a web app front end to various image encoders
)
objectcode 12 hours ago | parent
jaffathecake 8 hours ago | parent
andrewaylett 12 hours ago | parent
That said, I last benchmarked over a year ago, maybe I should re-evaluate. My experience was that AVIF was too slow for on-the-fly encoding, while JXL was absolutely fine and JPEGLI was also pretty useful.
est 8 hours ago | parent
Amazing.
throwaway2046 7 hours ago | parent
xigoi 1 hour ago | parent
aorth 4 hours ago | parent
Zardoz84 1 hour ago | parent
F3nd0 4 hours ago | parent
Have you tried encoding with JPEG XL’s modular mode? By default, libjxl only uses it for lossless and I haven’t tried with jixel, but in my experience, it often handles clean edges and smooth surfaces (the likes of which you might see in digital art) better.
> I'm a little nervous about this, because discourse around JPEG XL can get a little… weird.
As someone who’s been rooting for JPEG XL for years now, I also find the discourse a little upsetting. When first introduced, the format was very competitive with AVIF and steadily improving, until Google decided to single-handedly halt web adoption (de facto, because market share). No careful evaluation presented, no solid argumentation given.
My understanding is that the future of the format became uncertain at that point, because web adoption is regarded as crucial and no one wants to go all-in on a codec that may not end up filling the universal role it was designed for. Of course, AV1 encoders kept seeing lots of interest and improvement in the meantime, because everyone was already all-in on AV1 for video.
And now, when JPEG XL has finally painstakingly clawed its way back onto its original trajectory, now there are comparisons popping up showing how AVIF actually compresses better. People end up quoting them around social media, painting the picture that JPEG XL turned out to be the inferior format after all. It hasn’t, it just got a massive handicap.
Not that it’s a problem with your article. It’s informative, you compare the current state of available encoders for a specific use case, and you mention how they’re still evolving. It just sucks that we can’t really do a fair comparison of the formats at this point, yet that’s exactly what people will end up doing anyway, and it’ll really suck if it ends up hurting JPEG XL even more than Google already has.
RobotToaster 2 hours ago | parent
torginus 52 minutes ago | parent
JPEG XL can't be decoded in such a way, and tons of people still use JPG.
RRRA 29 minutes ago | parent