Header image
avatar
Sönke Ludwig • Fri, 01 Dec 2023

JPEG XL Support and Performance Enhancements · Aspect Preview 33

JPEG XL has been the most promising image format for the photography world after a long time of no practical progress in this area. New formats either focused on other uses cases, or they were proprietary and thus would never gain meaningful traction. We are excited to now be part of the circle of applications that support JPEG XL images.

The new format offers a state-of-the art compression ratio, while offering lossless and lossy compression modes, high bit-depths, alpha channels, progressive encoding, partial decoding, HDR contents, large image dimensions and much more.

In contrast to its main contenders, AVIF and HEIF, JPEG XL is designed to be a proper image format as opposed to reusing a video codec for still images. This has advantages in both directions, it offers some still image specific features, while staying relatively light-weight. AVIF and HEIF on the other hand carry a large code base related to video functionality which can make their integration a lot more cumbersome.

HEIF in particular also has the huge drawback of requiring a paid per-user license, making it practically unusable for free software. Windows and macOS mitigate this problem somewhat by providing system APIs for dealing with these images, but those are less than ideal, both functionality and performance wise. Also, on Windows, the user has to pay extra for the video codec in order images to be displayable.

In the future, we will also look into using JPEG XL as the format for storing cached thumbnails/previews, since its compression properties are superb. This will require some more performance testing, though, as both, encoding and decoding performance are rather critical for this particular use case.

The only thing that is still lacking in the reference implementation, libjxl, is support for decoding only parts of an image, as well as down-scaling during decoding. When talking about images with hundreds of mega pixels, which is not rare in the photography world, both are critical features. But apart from that we couldn't be more happy about the existence of this format and hope that hardware vendors may one day use it to replace not only ordinary JPEGs, but also RAW formats for all but very few use cases.

Performance Improvements during Image Analysis

One of the most important, but also most easy to forget aspects of the software has always been the one that revolves around creating the first library. Over the course of our open beta we have made some huge steps in improving both, the ease of use, as well as the performance of setting up a new library.

However, one major issue has always been that certain background processes compete with the user interface for resources, such as CPU or GPU time and disk bandwidth. In particular, while the "Analyzing Images" process is active, the UI could become rather sluggish and loading full resolution images could become very slow. Realistically, it was probably better to just wait for the analysis to finish rather than immediately starting to work with the library.

This release brings a massive improvement by introducing priority based disk I/O, always giving precedence to operations needed by the UI. Loading images is now more or less as fast as if no image analysis process were running. And also, while the application is actively used, just a single core is used now for the image analysis. Only after a certain time of inactivity will the application attempt to use the full CPU to speed up the process.

Now, while we solved another major issue with this, the experience is still not perfect, and probably can never be. Although the image analysis process doesn't affect performance anymore, as long as it isn't finished, cached thumbnails and preview images, as well as file hashes, will not be available for all images. Thus, image load times for small sizes will still be much slower and the duplicate detection during imports can not work as it otherwise would.

For this reason, we added a hint to the UI to make this more clear and to avoid wrong expectations or impressions of the applications performance.

Other Changes

Apart from image analysis, the JPEG metadata reading speed and loading speed of small RAW files (up to 64 MB) has been improved considerably. We have also updated the list of known image editor applications, so that the latest versions of some of the most popular programs get detected automatically.

As usual, there are a number of additional bug fixes and improvements. See the change log for the details and downloads: Version 1.0.0-preview.33

Comments for the post are currently disabled.

0 comments