Skip to main content
Known Participant
September 24, 2024

P: Certain raw files export unusually large with JPEG XL

  • September 24, 2024
  • 11 replies
  • 5582 views

In most cases, exporting AVIF and JPEG XL with corresponding settings produces files of fairly similar size. There's some variance as expected, some images compress a bit better with one format than another.

 

But certain raw files inexplicably compress very, very poorly with JXL. Here's a sample DNG file that exhibits the problem. https://drive.google.com/file/d/1Cs7TiY7LeA3CGUVCAzqKUl9pLSK6ek7X/view?usp=sharing

 

It seems common to DNGs produced by the AI denoising function or HDR merge tool, but that is not universal (I've found raws from the same camera that can be enhanced or made into HDR stacks and still compress normally on export)

 

The settings in the attached screenshot barely compress it at all from the original DNG! Despite said DNG containing over double the amount of pixels, and ostensibly less compression. The AVIF version with the same resolution and quality setting is over 80% smaller than either one. Again, on most images switching to AVIF at the same resolution and quality setting tends to result in fairly similar file sizes, not a 80-90% size reduction. Something about the attached DNG does not seem to be compressing properly on export.

 

[moved from bugs to discussions according to the community rules  - Mod.]

 

11 replies

alexanderc59985531
Participant
January 7, 2025

Seems like this doesn't happen on HDR exports from large panoramas, only SDR exports as well. This further points to it being a bug.

alexanderc59985531
Participant
January 7, 2025

Here is a panorama over 100MP in size. Try exporting AVIF and JXL at the same quality level (I used 10). The JXL will be around 300+MB while the JXL will be around only 22MB.

 

Test file to try exports 

alexanderc59985531
Participant
January 4, 2025

It seems like JPG XL exports are either bugged or include transparancy which is unnecessary and makes them oversized. For example, in a normal image, JPG XL even in 16-bit mode is smaller than JPG 8-bit while retaining higher quality:

14MB JPG

8.6MB JXL 16-bit

 

When exporting from a DNG Panorama in Camera Raw, I get the following file sizes (all exported at quality 10):

187MB 16-bit JXL

88.5MB 8-bit JXL

17.6MB JPG

8.4MB 10-bit AVIF

 

For all intents and purposes, the 16 and 8-bit exports of JPG XL should be nearly as small or smaller than AVIF, but just aren't. Based on the preview app on Mac, they include transparancies while the other formats don't. There is no option to turn this off from the Camera Raw export tab. If it's a case of tranparancies taking up space for no reason, then a checkbox should be added with it off by default as camera raw files never contain transparancies.

 

This is preventing me from adopting JPG XL as my new export format for panoramas when it works really well for all other photo exports including HDR. I would include examples but the files would be too large to upload here.

 

Photoshop 26.2

Camera Raw 17.1

Mac OS Sequoia 15.2

alexanderc59985531
Participant
January 7, 2025

I have an update. This seems to only happen with panoramas over 100MP in size. I have no idea why the encoder starts freaking out at large pixel sizes but that could point more to the problem. Exporting directly from the panorama DNG causes this while exporting a 16-bit TIFF, then re-exporting to JXL is a workaround. Please fix this, Adobe.

 

To replicate, just use any DNG panorama made in Camera Raw over 100MP and try exporting to JXL vs AVIF. JXL will usually be 5-10x size of DNG.

Participating Frequently
November 19, 2024

I have this same issue on MacOS. If I open a .NEF (Nikon Raw File) it opens fine with Camera Raw. I can save the image with no issues from Camera Raw into DNG or JPG formats. However, with JPG XL, I have many issues:

 

1) The shows the same size as the .NEF file, so it has no compression at all.

2) The 'Very High' setting is 2 times LARGER that the .NEF file and has image discoloration and block artifacts.

3) The 'High' setting is about 1/2 the size of the .NEF file and has artifacts and color banding.

4) The 'Medium' setting has edge banding.

And so on.

 

 

 

Rick.Williams
Known Participant
October 30, 2024

I'm seeing similar results. I often use the Panorama stitch function to make high resolution panoramas from iPhone 48mpx files. They usually result in a .dng file that is about 150mb. An 80% JPEG XL export is running 250-300mb on many of these.

HDR and Rec 2020 if that matters.

Participating Frequently
October 26, 2024

Mine is doing this as well, JPEG is 12 MB but the JXL is ~60 MB, definitely something going on here. I'll be waiting for Adobe to release a statement or patch. Files were from both Canon and Nikon RAW files, not converted to DNG at any point, lossless 16-bit export. 

Rikk Flohr_Photography
Community Manager
Community Manager
October 17, 2024

Setting status

Rikk Flohr: Adobe Photography Org
Participant
October 15, 2024

This might be fixed in the latest version of camera raw/lightroom.  A quick test gets me JXL files at a similar size to AVIF when at high quality (very high is still a very large file size).

Participating Frequently
October 15, 2024

Thanks for the heads up. Do you know if they added 10-12 bit output for the JXL? So what you are saying is that a 16 bit JXL at 90 quality will still produce an image as large as a 12 bit Avif in 90% quality?

Participant
October 2, 2024

I've been seeing the same with all of my Nikon raw files (*.NEF) - Jpg-XL exported with lightroom or camera raw results in massive file sizes (compared to jpg) regardless of compression/quality/colour space settings.  At high quality, I'm getting 20mb+ JPG-XL and 8mb equivelent jpgs.  AVIF has no problem, and produces excellent quality images at much smaller file sizes than JPG.

johnrellis
Legend
September 25, 2024

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

With your sample DNG, I made  a lot of measurements of file sizes, comparing exported JXLs with exported AVIFs and with JXLs produced by Imagemagick (which uses the reference "libjxl" reference library associated with the ISO standard).

 

For this photo, the JXLs are 2 to 3.2 times larger than the AVIFs and 3.6 to 6.7 times as large as those produced by Imagemagick.

 

DETAILS:

 

All the exports were with Prophoto and Bit Depth = 16.

 

DNG > JXL -- size of .jxl exported from the DNG

TIFF > JXL -- size of .jxl exported from a TIFF losslessly converted from the DNG

DNG > AVIF -- size of .avif exported from the DNG

TIFF > AVIF -- size of .avif exported from a TIFF losslessly converted from the DNG

Magic TIFF > JXL -- size of .jxl converted by Imagemagick from the TIFF 

 

 

(*) With Imagemagick, Quality = 100 means "lossless".

 

Note that Quality isn't directly comparable between formats and converter programs, though it ranges between 1 and 100 for all of them.

 

Observations:

 

- JXLs made by Imagemagick from the TIFF are 3.6 to 6.7 times smaller than LR's JXLs.

 

- AVIFs from the TIFF are 2 to 3.2 times smaller than JXLs.

 

- JXLs from the TIFF are 1.1 to 1.6 times smaller than from the DNG. I think this is because the DNG contains a Transparency Mask (an alpha channel) added by LR's Photo Merge, whereas that mask gets dropped when the DNG is converted to a TIFF.