• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

Certain raw files export unusually large with JPEG XL

Explorer ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

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.]

 

TOPICS
Windows

Views

242

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 24, 2024 Sep 24, 2024

Copy link to clipboard

Copied

The Enhanced DNG file contains a demosaiced file, which is typically 3 times the original file size as it now contains RGB channels. Additionally, the Enhanced DNG file also contains a copy of the original mosaic data (i.e. a copy of the original raw file (copy from Ian Lyons in ref 1)

 

 

 

They do not behave the same as normal DNG files

 

1) https://community.adobe.com/t5/lightroom-classic-discussions/why-are-dng-files-produced-bt-denoise-a...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 02, 2024 Oct 02, 2024

Copy link to clipboard

Copied

This has nothing to do with my post, I'm talking about the EXPORTED .jxl files, the size of the DNG is not what this discussion is about. Since the buffer is always RGB prior to compression, the fact that the enhanced DNGs are demosaiced is irrelevant.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 03, 2024 Oct 03, 2024

Copy link to clipboard

Copied

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

 

It's clear LR's JXL export is creating files that are much too large.

 

I randomly picked three raws from my test library, from a Sony 7M4, Canon R5, and Nikon Z8. I exported 16- and 8-bit JXLs (quality = 70), JPEGs (quality = 70), and AVIFs (10-bit, quality = 70), all Prophoto RGB. I used Imagemagick to create JXLs from the raws and from TIFFs exported from the raws (quality = 90).

 

As evidence the 16-bit JXLs are too large, consider that they are:

 

- the same size as the 8-bit JXLs.

- 2.7 - 3.7 times as large as 16-bit JXLs made by Imagemagick.

- 2.3 - 6.4 times as large as 10-bit AVIFs.

- 1.2 - 2.4 times as large as lossy DNGs (linear raws using JPEG XL compression).

- 2.5 - 3.4 times as large as 8-bit JPGs.

 

The quality values aren't directly comparable between the various formats and tools, but they directionally indicate a problem, especially considering that LR JXLs (quality = 70) are much larger than Imagmack JXLs (quality = 90).

 

You can download the raws and the output files here:

https://www.dropbox.com/s/vkgtowf0c5d2beh/jxl-size.2024-10-03.zip?dl=0 

 

The detailed measurements:

 

JohnREllis_1-1727991608118.png

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 03, 2024 Oct 03, 2024

Copy link to clipboard

Copied

LATEST

@Rikk Flohr: Photography, something is amiss with exporting as JXL. See my previous post for details. Please consider moving to Bugs.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 25, 2024 Sep 25, 2024

Copy link to clipboard

Copied

[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 

 

JohnREllis_0-1727293936132.png

 

(*) 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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 02, 2024 Oct 02, 2024

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines