Skip to main content
Participating Frequently
June 13, 2024
Question

P: Color artifacts in JPEG XL ProPhoto RGB

  • June 13, 2024
  • 14 replies
  • 10383 views

JPEG XL files with the ProPhoro RGB color space exported from Lightroom contain color compression artifacts. They appear in quality 100% and lower. Other color spaces do not have this problem.

 

Lightroom version 13.3.1

Windows 11 23H2 version 22631.3593

14 replies

apf102
Known Participant
September 23, 2024

Thanks. Have replied on the other forum too.

 

RE the bug. I can make the artefacts appear if I export to JXL in Rec2020 16bit with quality set to 100%. It is only the uncompressed exports which seem to be fine. 8 bit also fine.

apf102
Known Participant
September 23, 2024

Weird artefacts with jpeg xl exports + advice on best export format

expectated behaviour - high quality jxl file

actual behaviour - file has blocky artefacts and weird colour shifts

Lr Classic  13.5.1 in Win 11 and Lr 9.5.1 on iPad 

 

Hi. Two quick questions.

1) Does anyone know why I am getting these weird red artefacts on my Jxl exports? This is viewed on Lr Cc on my iPad. Original file was a NEF of a film negative. It was converted in negative lab pro. You can see the NEF displays fine. If I export from the NEF to a jxl I get similar red artefacts, though less pronounced. Other formats are fine. The jxl settings were 16bit compressed at 100% quality in ProPhoto colour space from LR Classic on Pc.

2) this is a workflow question. I tend to import and convert film negatives in Lightroom Classic, but for various reasons I like to edit on my iPad. This means the best workflow is to create a positive image for editing on iPad and getting rid of the raw (I have the negative so no biggy). I had been exporting to sRGB JPEG but was getting weird results when printing and of course you lose a load of depth.. Tiffs are way too large to use. The plan was to use 16bit jxl maybe with ProPhoto colour space, which seems to be about 25mb, but am getting the issue described above.

Any ideas much welcomed!

johnrellis
Legend
September 23, 2024

Re the workflow question, see my suggestion for syncing the NEFs with LR Cloud and then LR Mobile on the Ipad:

https://www.lightroomqueen.com/community/threads/workflow-issues-with-jxl-and-lightroom-classic.51142/#post-1340444

johnrellis
Legend
September 23, 2024

Re color artifacts in JPEG XL ProPhoto RGB exports, Adobe has acknowledged this bug:

https://community.adobe.com/t5/lightroom-classic-bugs/p-color-artifacts-in-jpeg-xl-prophoto-rgb/idi-p/14678954


The color spaces Display P3 and Rec 2020 don't appear to have the problem.

Rick Spaulding -
Legend
June 27, 2024

 

Update:  Recommendations:

  • If using lossy compression, prefer using JXL-native color spaces such as sRGB, Display P3, or Rec 2020.
  • If you must use non-native color spaces such as Adobe RGB or ProPhoto, consider using Lossless (quality 13).
Known Participant
January 19, 2025

I'm seeing artifacts I've not seen before when exporting in the JPEG XL lossy format. (90%) quality)

These a red blocks (I think 8x8 pixels size) around a strong blue colored bird. 
See areas indicated by yellow areas on the picture below.
I compared it to TIFF and JPEG (90%) of identical of identical size (pixels), both are looking fine.
Increasing the JPEG XL quality to 100% doesn't solve it. Going to Lossless does.

When I started using JPEG XL, I have evaluated it and saw superior quality compared to JPEG of similar file size. These artifacts are new to me.

I'm using LR 14.1.1, Windows 11 computer.
See attached picture at 300% for easy vieweing. Unfortunately the artifacts are visible at 100% too.

Is this normal for JPEG XL? Have I overlooked it in the past? Is the contents of my picture so specific and causing this? is it a bug ? Are a few of the questions I have.
Can share the DNG file if you like.




 

reproo2773183
Inspiring
February 3, 2025

@reproo2773183: "When you say "In the DNG spec, un-demosaiced sensor data from the camera's color filter arrays are stored in the DNG", this is optional or always?"

 

Raws coming straight from cameras always contain color-filter array samples (un-demosaiced).

 

DNGs produced by LR's Photo Merge and Enhance commands store the merged/enhanced image as linear raw (demosaiced). But they also store the original, unmodified CFA samples in a separate section of the file.

 

"If you have (DNG) output from DeNoise or Pano Merge which is de-mosaiced but still "camera color space" LinearRaw would you need the un- [de]mosaiced?"

 

As mentioned above, the DNGs produced by Photo Merge and Enhance also contain the original CFA samples (un-demosaiced), but I don't know of any parts of LR or Camera Raw that actually uses it. Adobe said a couple years ago they included the original CFA data in anticipation of possible future enhancements, though they haven't provided more details.  If you retain the original from-the-camera raw, you'll still have access to the original, unmodified image.

 

"from reading the DNG spec I think I get that its the de-mosaiced data that can be JPEG XL, I'm also thinking that this is still "camera color space" LinearRaw; so still has full flexibilty to be manipulated/converted by camera profiles the ICC color connection space."

 

That's correct. The linear raw (demosaiced) pixels are still in camera color space.  They are usually compressed using the JPEG XL compression algorithm, though they could also be compressed with JPEG compression or uncompressed, as allowed by earlier versions of the DNG spec.  But only the compression algorithms of JPEG XL and JPEG are involved with linear raw data -- no other aspect of the JPEG XL or JPEG file formats are used with linear raw.

 

"When you Export Lightroom tries to go back to the de-mosaiced linear raw JPEG XL and convert that to JPEG XL (but unsupported ICC) its going wrong in a manner that doesn't go wrong when going through Lightroom's internal ProPhoto (D50) to screen."

 

The different uses of the term "JPEG XL" are causing confusion here.

 

The linear raw DNGs produced by Photo Merge and Enhance use JPEG XL compression to store the linear raw pixels (in camera color space), but they are full raws.

 

When you export any file to JPEG XL file format, the output file is in full JPEG XL format ("JXL") , and the output pixels are in the specific color space (e.g. sRGB or Prophoto), not in camera color space.  The problem with artifacts in the output JXL file is, according to Adobe, caused by the use of certain color spaces (Prophoto and Adobe RGB), which are called "non-native" for as-yet unexplained reasons. The implication is that JPEG XL format doesn't really support those color spaces somehow. It's hard for me to learn more, since the ISO charges hundreds of dollars for the privilege of reading their specs.

 

"I'm also wondering if for Adobe JPEG XL is limited to Linear Raw, which would explain why it opens in ACR rather than Photoshop?"

 

When you open a DNG stored in linear-raw format in Photoshop, it opens in CR because the DNG is a full-fledged raw file.

 

But when you open a JXL exported from LR in Photoshop, it too opens in CR. I think that's a small Photoshop bug. Opening JXLs in PS should behave the same as opening JPGs.

 

 


"The implication is that JPEG XL format doesn't really support those color spaces somehow."

Its only when you add in lossy compression that you get the artifacts.

I'm now thinking its during the conversion from the native space to the non-native space some of the maths/rounding doesn't allow for a number bigger than 1  or smaller than 0 and you get a blown or clipping artifact in one or more of the channels.

johnrellis
Legend
June 14, 2024

I see similar artifacts when exporting to JXL with these options in LR 13.3.1 / Mac OS 14.5:

 

Prophoto, 100%, 16 bits/component

Adobe RGB, 100%, 16 bits/component

 

I don't see the artifacts with these options:

 

Display P3, 100%, 16 bits/component

Rec 2020, 100%, 16 bits/component

Prophoto, Lossless, 16 bits/component 

 

You can download the original DNG and exported JXLs from here -- the files are perspicuously named:

https://www.dropbox.com/s/93agakaa94zsns6/export-jxl-artifacts.2024-06-13.zip?dl=0

 

  

 

 

 

 

johnrellis
Legend
June 14, 2024

@Rikk Flohr: Photography@Rick Spaulding -, please consider moving to bugs. I've uploaded a sample file that exhibits the problem (see above).