jAlbum 39 welcomes AVIF

Hi everyone,
jAlbum 39 is here. The big news this time is read and write support for the superior AVIF image format. AVIF (“AV1 Image file Format”) is supported by basically all browsers today and is seen as the successor to JPEG.

AVIF advantages over JPEG:

  • Far better compression. Typically 1/3 or better vs JPEG
  • Support for transparency
  • Support for HDR
  • Support for higher bit depth than 8 (finer color gradients)
  • Animation support
  • Support for lossless
  • Open format. Not license infested
  • Wide browser support (93-96% of browsers). (Use Variants with JPEG as fallback if you’re concerned)
  • Wide market support: AVIF is backed by industry leading software gigants.

Examples

Just to showcase how impressive AVIF is, check out these jAlbum galleries, all naturally made from the same set of images, but with different image settings:

5 MB AVIF sample (extremely compressed at 30%, just to showcase the power of AVIF)

8 MB JPEG sample (horrible artifacts at 5% quality)

Yes, it’s right. That middle AVIF example is only 16% the size of the JPEG gallery! The larger (8MB) JPEG gallery is unusable. You can figure out that this allows for more images on the same storage space and faster delivery.

Some images, typically macro shots compress even better. Check out this crazy side-by-side comparison of a JPEG and a 36 times smaller AVIF.

These were a few extreme examples, just to showcase how well AVIF compress. Here’s an AVIF gallery that’s roughly half the size of the 32 MB JPEG gallery – perhaps a more normal setting.

In jAlbum we’re using top performing native code for both AVIF reading and writing (libavif 1.3). We support AVIF across all platforms (Windows, Mac, Linux) and CPU architectures (Intel+arm/M). The underlying “libavif” library uses top performing SIMD instructions to achieve great performance for both reading and writing AVIF images, just like we do for JPEG images with the TurboJPEG library.

AVIF support is not available for the older “Catalina” Mac version of jAlbum. We’re using the fast “FFM” native code API that isn’t available on the Java version that jAlbum release runs on. Update to a more recent Mac OS!

jAlbum also supports reading and writing EXIF and xmp metadata with AVIF files.

New Setting->Images panel

jAlbum’s settings window is redesigned, and now looks like this:

The “flow” of the image settings panel now follows the pipeline images go through as they’re being processed by jAlbum, so you find the image bounds early and settings for file generation last.

You see that the output format setting has been moved from Advanced, as we assume that many users will want to make the switch to AVIF easily. Just switch it from “JPEG” to “AVIF” and hit “Make album” to try AVIF.

AVIF quality and AVIF speed

When generating AVIF images, you have two settings to experiment with: AVIF quality and AVIF speed. AVIF quality allows you to control the compression quality, and just like with the JPEG quality, it’s a balance between file size and image quality, but in contrast to JPEG quality, AVIF quality produces remarkably good images even with low quality settings, like our examples revealed. We’ve set a “safe” default of 60, which produces images of roughly half the size of JPEG images.

“AVIF speed” is an interesting setting, unique for AVIF: Here you’re trading encoding (image writing) speed for file size and quality. With a high speed setting (10) you can produce previews in remarkably short time at the expense of size and quality, (but only slightly). Conversely, lowering “speed” to 1 gives you somewhat smaller and better looking images at the expense of significantly lower encoding speed. I recommend staying in the range 4-6.

Variants panel

If you’re using Variants, they have now moved to a separate tab. Short refresher: Variants allows you to use alternative image sizes and formats and allow the browser to choose the best fit. If you want to ensure that your galleries works on 100% of all browsers (vs 93-96%), add AVIF images as Variants and use JPEG as your general output format. To also cater for those who have HiDPI screens (“retina” screens), I suggest that you add a “2x” Variant, i.e. images of twice the width and height as your typical images.

If you don’t want to generate multiple image variants, I suggest that you instead tick “Use HiDPI thumbnails” under Settings->Images->Advanced. This gives crisp thumbnail images for anyone with a HiDPI (“retina”) screen, and with AVIF, the compression is so good that you actually don’t need to pay a size penalty for the increased image pixel size. (“HiDPI” images are equivalent to a 2x Variant)

Choosing codecs

jAlbum 39 ships with multiple AVIF reading and writing “codecs”:

Reading (decoding):
“aom” (Fast reference implementation)
“dav1d” (Default. Super fast and memory slim)

Writing (encoding):
“aom” (Default. Fast reference implementation)
“SVT_AV1” (Fast, heavily accelerated)

You’ll likely be happy with the defaults we’ve chosen, but for now, you can play with the other codecs under Preferences->Advanced->AVIF. Just a word of caution: The SVT_AV1 codec can cause crashes during heavy load. We hope this can be addressed in a future update, still it’s interesting to hear what codecs you prefer. Without feedback, we’ll probably ship jAlbum with the “dav1d” codec for reading and “aom” only for writing for future versions.

AVIF limitations in jAlbum

jAlbum supports reading ordinary AVIF images and AVIF images containing transparency along with EXIF and xmp support. However, the following features of AVIF are currently not supported:

  • Animated AVIFs (only first image considered)
  • Deep bit depth images (more than 256 colors per color channel). Images are converted to 8 bit per color channel
  • HDR images (will currently appear with faint colors)

We naturally listen to feedback and try to prioritise implementing what’s in demand. Please bring any feedback to support@jalbum.net or our user forum.

Conclusion

AVIF allows you to safely produce galleries of half the size without any quality degradation vs JPEG and to sometimes go as low as 1/6 in size vs JPEG without any significant quality degradation. Add to that wide browser and market support + the other advantages AVIF has (transparency, animation, HDR, hi bit depth etc) it’s safe to say that AVIF is the legitimate successor to 34 year old JPEG format.

I could go on for ages on how good AVIF is, but refer to this blogger that does excellent comparisons.

The full list of improvements and bug fixes in jAlbum 39 are available in our release notes. Download jAlbum 39 today!