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

P: DNG embedded JPEG XL Orientation not set correctly

Community Beginner ,
Jun 26, 2024 Jun 26, 2024

The orientation of DNG embedded JPEG XL files ("PreviewJXL") does not seem to be set correctly. The orientation is set in the metadata, but the JPEG XL specification explicitly states that metadata orientation should be ignored and instead be read from the stream: "The Exif orientation should be ignored by applications; the JPEG XL codestream orientation takes precedence and libjxl will by default apply the correct orientation automatically."  (https://github.com/libjxl/libjxl/blob/b7961e1318634a95c7d689ec340dbad8a42d4ed4/lib/include/jxl/decod...) So when viewing a JPEG XL preview file, the orientation is wrong unless it's 0.

 

Bug Acknowledged
TOPICS
macOS , Windows
881
Translate
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

correct answers 1 Pinned Reply

Jun 28, 2024 Jun 28, 2024

Thanks for reporting this. We were able to reproduce the issue, (thanks, @johnrellis ) and have logged this for the team to investigate.

Status Acknowledged
Translate
7 Comments
LEGEND ,
Jun 26, 2024 Jun 26, 2024

I believe they are using JPEG XL compression, not actual JPEG XL files.

Translate
Report
Community Beginner ,
Jun 26, 2024 Jun 26, 2024

The binary data extracted from the "PreviewJXL" metadata field is a JPEG XL file in the form of a ISOBMFF container. 

 

Example .dng:

https://drive.google.com/file/d/1h5vXA1NTEtjpikeQGaEYEPRlMrizOSep/view?usp=sharing

 

Example .jxl (extracted from the .dng):

https://drive.google.com/file/d/1MWVUUKxYn-XVBSU_f7zqus2RxiMnjZId/view?usp=sharing

 

 

Translate
Report
LEGEND ,
Jun 26, 2024 Jun 26, 2024

The DNG spec gets to specify how it handles embedded JPEG XL, overriding whatever the JPEG XL spec says. But the DNG 1.7.1 spec says (page 22):

 

"When using JPEG XL to represent a preview IFD, such as a thumbnail or full-resolution rendered preview, it is recommended to use a single tile with the container format [ISO BMFF], so that utilities can extract a readable, standalone JPEG XL file by simply copying the bytes from the IFD."

 

I think that clearly implies that the orientation in the JPEG XL metadata should be correct, so that the extracted JPEG XL file displays correctly.

 

It's too bad that ISO has such an antediluvian, counterproductive policy of charging hundreds of dollars for specs.

Translate
Report
LEGEND ,
Jun 26, 2024 Jun 26, 2024

To make this into an actionable bug report to which Adobe is likely to pay attention, please provide a step-by-step recipe of which software you used to create the DNG, the options used,  and the command line for extracting the JXL SubIFD.  Also, upload a sample raw to Dropbox, Google Drive, or similar and post the sharing link here.  Unless Adobe can easily reproduce the problem, they generally won't pay much attention.

Translate
Report
Community Beginner ,
Jun 27, 2024 Jun 27, 2024

Thanks for the clarification!

 

I'm not sure if I should create a new post in "Bugs" but I'll start by updating this issue with the following:

Lightroom Version: Lightroom Classic 13.4 / Camera Raw 16.4
OS Version: macOS 14.5

Steps to Reproduce:
1. Open Lightroom Classic
2. Import a photo that is taken in "portrait mode" (for example the attached file "test.arw")
3. Export the photo as a DNG file with the option "Use Lossy Compression" enabled
4. Use Exiftool to extract the JPEG XL preview from the DNG file:
exiftool -b -PreviewJXL -w .jxl test.dng
5. Open the JPEG XL preview in an image viewer that supports JPEG XL (for example Safari on Mac) and note that the orientation of the image is incorrect.

Expected result: the JPEG XL preview file shows in "portrait" mode, i.e. the same as the original file.
Actual result: the JPEG XL preview file shows in "landscape" mode, i.e. rotated 90 degrees.
Translate
Report
LEGEND ,
Jun 27, 2024 Jun 27, 2024

@Rikk Flohr: Photography@Rick Spaulding -, please consider moving this to Bugs. I'm able to reproduce the problem following @jhhf's recipe above:

https://community.adobe.com/t5/lightroom-classic-discussions/dng-embedded-jpeg-xl-orientation-not-se...

Translate
Report
Jun 28, 2024 Jun 28, 2024
LATEST

Thanks for reporting this. We were able to reproduce the issue, (thanks, @johnrellis ) and have logged this for the team to investigate.

Status Acknowledged
Translate
Report