/t5/lightroom-classic-bugs/p-dng-embedded-jpeg-xl-orientation-not-set-correctly/idi-p/14703504Jun 26, 2024
Jun 26, 2024
Copy link to clipboard
Copied
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.
/t5/lightroom-classic-bugs/p-dng-embedded-jpeg-xl-orientation-not-set-correctly/idc-p/14704683#M55141Jun 26, 2024
Jun 26, 2024
Copy link to clipboard
Copied
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.
/t5/lightroom-classic-bugs/p-dng-embedded-jpeg-xl-orientation-not-set-correctly/idc-p/14704704#M55142Jun 26, 2024
Jun 26, 2024
Copy link to clipboard
Copied
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.
/t5/lightroom-classic-bugs/p-dng-embedded-jpeg-xl-orientation-not-set-correctly/idc-p/14705193#M55143Jun 27, 2024
Jun 27, 2024
Copy link to clipboard
Copied
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.