JPEG XL Orientation

*** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
bananakid
Posts: 4
Joined: Mon Apr 20, 2020 12:00 pm

JPEG XL Orientation

Post by bananakid »

Environment: Windows 10, version 21H2
XnView MP: 1.7.1, 1.8.3

I take a picture with my DSLR camera while holding it it "portrait" mode (no settings touched on the camera side). I then import the JPEG file to my computer. There I convert my JPEG to JPEG XL in two different ways, both using the most recent reference implementation binaries of JPEG XL provided by one of the developers (I open Command Prompt in the location of JPEG file before I run the command, I also set Path to JPEG XL binaries in computer's Environment Variables before that):
1) lossless recompression — for /r . %f in (*.jpg) do cjxl -j 1 -d 0 -e 10 --brotli_effort=11 "%~f" "%~dpnf._100.jxl"
2) lossly 90% compression — for /r . %f in (*.jpg) do cjxl -j 0 -m 0 -d 1 -e 10 --brotli_effort=11 --num_threads=14 "%~f" "%~dpnf._90.jxl"

This is the result I get in XnView MP's browser window if I have Settings → General → Auto-rotate images according to EXIF orientation turned on:
Image

This is the result I get in XnView MP's browser window if I have Settings → General → Auto-rotate images according to EXIF orientation turned off:
Image

Here's the EXIF data of JPEG.

Here's EXIF data of JPEG XL (both lossless and lossy are the same).

When viewing any of JXL images I get the same orientation as in preview/thumbnail image displayed in browser. That results in wrong orientation of JXL compared to other formats, i.e. JPG: if the auto-orientation is on, the JXL get's rotated-orientated twice in browser/viewer of XnView MP (i.e. 540° instead of 270°), and if auto-orientation is off, the JXL still gets rotated-orientated (i.e. 270° instead of 0°). This makes it challenging to work with folders that contain mixed file types, i.e. JXL+JPG+PNG.

I find current behavior to be quite confusing because I have to constantly switch auto-rotation on and off to manage photos library. I've tried to figure out why that happens but came across only a convoluted explanation in JPEG XL's source code, a brief mention of the kind of sort of the same issue in GitHub comments of the other project and a discussion at Adobe forums that lead to bugfix of Adobe's software.

P.S. I'm sorry this report doesn't follow bug report template closely. I hope this won't make my report obsolete.
Last edited by bananakid on Sun Dec 01, 2024 1:00 pm, edited 1 time in total.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView MP 1.8.3 JPEG XL Orientation

Post by xnview »

Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: JPEG XL Orientation

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.8.4. Please check and confirm the bug fix here.
Pierre.
Post Reply