Bonus: A Quick Look at Next-gen Image Formats (JPEG XL etc)

Checking these out seemed like a natural extension of reviewing my video/audio settings, so I figured I’d do a quick write-up on what I learnt.

 

This is part of The Big 2022 PC and NAS Upgrade.

 

30 years of JPEG

The JPEG image format was first released in 1992, and for some reason we’re still using it despite its exceedingly mediocre compression efficiency by modern standards. JPEG 2000 was an attempt to replace it 20 years ago but didn’t succeed (and to be fair, I’m not even sure it was truly an upgrade if its Wikipedia page accurately portrays its performance compared to JPEG).1

There have been other attempts as well, but thus far none have widely succeeded.

Well, armed with a full 20 years of technological progress since JPEG 2000, we’re taking another stab at it, and these seem to be the top contenders:

  • AVIF, which is based on AV1’s compression.
  • HEIC, which is based on HEVC (H.265)’s compression – not to be confused with the container format HEIF, which can hold HEIC.
  • JPEG XL, which is notably not based on existing video compression.
  • WebP, which has been around for a while (so isn’t really “next-gen”) and is based on VP8’s compression.

Beyond just having efficient compression, a good format for images should compare favorably in other areas too – there’s more to a good format than just quality.

After reviewing the performance and specifications of the next-gen contenders, JPEG XL looks like the clear winner to me, and based on the information I’ve looked at I really hope it gains widespread adoption in the coming years.2

Here’s why I like JPEG XL:

  • Open / royalty-free format (AVIF and WebP are as well, HEIC is not).
  • Competitive overall compression efficiency vs AVIF/HEIC, and better than older WebP.
  • Better performance for high-detail images than AVIF/HEIC (important given that we want this format to displace JPEG in photography etc).
  • Broad support for a wide variety of technical specs (resolution, bit depth etc).3
  • Unique: backwards compatibility with JPEG images (!!).
  • Progressive decoding, which is super valuable for web-delivered images given that that’s — check notes — almost all images these days. Note that it looks like AVIF has added / is working on adding this.
  • Fast encoding and decoding even without dedicated hardware support (it’s important to support old and low-end devices if you want to displace JPEG there!).
A simulated example of an image that’s only 20% loaded. Left to right: original image, no partial decoding, sequential, and non-sequential progressive.

The backwards compatibility of JPEG XL is also incredibly cool. Normally if you re-encode between lossy compression formats,4 you end up losing data for each compression pass, resulting in a lower quality result than if you just compressed directly a single time from the original source file.

JPEG XL can take an existing JPEG file, compress it into a new JPEG XL file and lose no additional information yet still produce a smaller file. The reverse is also possible; you can shuffle back and forth indefinitely between the two formats with no loss of data. Extremely useful for compatibility concerns!

Example transition from JPEG to JPEG XL. Image credit: Cloudinary (although I’m unsure if they’re the original source or not).

There are also couple of notable areas where JPEG XL is weaker than its competitors, but I don’t think they’re deal-breakers:

  • At very low bit rates, it has worse subjective performance than AVI and HEIC, but bit rates this low are comparatively uncommon in real-world usage as far as I can tell. I think even a highly bandwidth-optimized (low quality) web image is probably still a high enough bit rate for JPEG XL to be competitive, but you should double-check this point if it’s important to you.
  • JPEG XL has only very basic animation support, making it a far-inferior replacement for animated GIFs than say, an animated AVIF. Part of this is because formats like AVIF have been ported from video compression, so are already really good at handling an animated sequence of images.

It’s also worth underlining that there doesn’t need to be “one true file format”. We could totally have JPEG XL displace JPEG for most images and then make use of other formats where they make sense, such as getting animated AVIFs to try to displace animated GIFs for example. Some people get super cult-y about the format they personally like, and want it to be the universally used and worshiped format. I just want a merit-based format, and am perfectly content with a landscape that uses multiple formats as appropriate; we already do that right now with PNG + JPEG + GIF + WEBP combined probably covering over 99% of all compressed images.

Bonus bonus: image viewers and editors

(As we’ve gone further and further away from the core of the articles (NAS + PC upgrade), there’s been less and less detail. This final section of Phase 1 was where I researched just enough for me to make decisions for me, so you might not reach the same conclusions if you did your own in-depth research.)

There is some support for the next-gen image formats, but things are still a ways off from the universal support you’ll get with a JPEG file. As such, you end up (probably) needing to get new software to view next-gen formats. After not-that-much research and testing, I’ve landed on using the following:

For common formats (JPEG, PNG, etc): Windows Photo Viewer, which is present-but-disabled by default in Windows 10; it can be enabled via a registry edit. I still prefer this over the default Photos app, and also prefer it over the below options for quick, simple viewing. I imagine I’ll need to replace this choice at some point in the future given that it’s not really supported anymore.

For “exotic” formats (AVIF, JPEG XL, etc): nomacs, a free and open source image viewer which I had never heard of until a couple of months ago. The reason I don’t use it for common formats is partly because I’m lukewarm on the UI (I prefer a more minimalist view for general viewing), and partly because I’m lukewarm on its icon format. I know that the latter could be changed, it’s just a level of hassle I’ve decided not to deal with right now. The last stable release was a couple of years ago, but it looks like there’s still a bit of activity on dev builds.

For GIFs specifically: also nomacs. I also considered (and briefly used) GIF Viewer, but it has a weird quirk/bug where it doesn’t always show a GIF at its native resolution by default. That makes it a bad general-use viewer, but I still find it useful for specific purposes due to its ability to pause, seek, and override frame rate of GIFs as well as seamlessly resize during playback. Honestly the default Photos app on Windows is probably fine for general-purpose GIF viewing as well, I just feel slightly gross using MS Store apps in general.

 

Phase 1: storage + software (2022)

Phase 2: CPU + GPU (2022~2023)

  • CPU and GPU Upgrade (ongoing)
  • Leftovers and Looking Ahead (ongoing)

 


 

  1. This guy seems to present that it is, but even in their examples I can barely see an improvement. He also uses 50% quality for both formats, whereas I’m more interested in quality vs file size, not quality vs export setting.
  2. Which makes Chrome’s decision to reduce support for the format pretty irritating.
  3. AVIF does particularly poorly here, with a maximum image size of 3,840 x 2,160. I don’t know the exact details but I think it’s expandable with tiling (multiple images stitched together). However, the  artifacts on the edges of each tile are often visible so I don’t think tiling excuses AVIF here.
  4. Like taking a JPEG image and then saving it as another JPEG image.

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept the Privacy Policy

This site uses Akismet to reduce spam. Learn how your comment data is processed.