[Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Bugs which are supposed to be fixed in the next test version (not available yet)

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
sx090
Posts: 37
Joined: Thu Jan 11, 2024 8:49 am

[Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by sx090 »

Hi all,

I've been using XnViewMP for organizing and adjusting images, and I find the functions “Rotate based on EXIF orientation field” and afterwards “Rebuild EXIF thumbnails” particularly useful there.

I now want to use XnConvert to automate batch image compression (and re-encoding to JPGli) and would like to know:

Can XnConvert automatically rotate images based on the EXIF orientation field, just like XnViewMP does? If so, where is the option located?
I mean, rebuilding the embedded thumbnail seems possible, directly within hte JPG format settings... But I can't find the setting to rewrite the orientation of the Image...

EDIT: Check my Post #3 - it seems XnConvert does NOT recalculate the embedded EXIF Thumbnail, original files from my Samsung S23.

Thanks in advance for your help!

Best regards,
Björn

EDIT:
Sample files
https://www.dropbox.com/scl/fo/tcy5yo0c ... ft6ud&dl=0
Last edited by sx090 on Wed Jun 25, 2025 6:28 am, edited 3 times in total.
cday
XnThusiast
Posts: 4410
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnConvert - Rotate based on EXIF orientation

Post by cday »

sx090 wrote: Tue Jun 24, 2025 2:43 pm Can XnConvert automatically rotate images based on the EXIF orientation field, just like XnViewMP does? If so, where is the option located?
I mean, rebuilding the embedded thumbnail seems possible, directly within hte JPG format settings... But I can't find the setting to rewrite the orientation of the Image...
That seems to be supported in Actions > Transform > Rotate where a radio button is provided to select it...
I want to make sure that after compression, the images are still correctly oriented and have updated thumbnails for better previewing in file explorers.
I can't comment directly on that, but you should now hopefully be able to check actual operation... :D
sx090
Posts: 37
Joined: Thu Jan 11, 2024 8:49 am

Re: XnConvert - Rotate based on EXIF orientation

Post by sx090 »

Thank you for your help - I ran some tests and I can't seem to properly understand the combination of different checkboxes - it seems buggy to me overall.

I have two input images from my Samsung S23, one in landscape, one in portrait mode. See here (rotation icon):

Image

It seems to NOT matter whether I add the Action "Transform > rotate -> EXIF orientation" or uncheck it:
In both cases, the image itself is actually rotated and the EXIF orientation shows "Top Left" afterwards. So this part looks good and fine (even though I could imagine some ppl don't want the EXIF tag to be "reset" - but at least for me: This is exactly what I wanted).

The "buggy part" is the Thumbnail: Under JPG format settings, I activated to re-calculate the EXIF thumbnail, but the image thumbnail shows wrongly orientated both in XnConvert and XnViewMP after my compression.


Image
It seems the EXIF thumbnails are not re-calculated properly...

It looks like this (you can clearly see, the orientation was reset to "Top left" but the Thumbnail is wrong:

Image

I also verified it when I ran this command before/after: The extracted thumbnails are binary-identical before/after

Code: Select all

exiftool -b -ThumbnailImage 20250622_111344.jpg > thumbnail_before.jpg
... run xnconvert here ...
exiftool -b -ThumbnailImage 20250622_111344.jpg > thumbnail_after.jpg
sx090
Posts: 37
Joined: Thu Jan 11, 2024 8:49 am

Re: [Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by sx090 »

Hey :)
did you find time to replicate the mentioned scenario!?
I mean as a workaround I could use XnView MP in the meantime, but I find XnConvert for my workflow very convenient :)
User avatar
xnview
Author of XnView
Posts: 46362
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by xnview »

Please update the link of you sample file, no more available
Pierre.
sx090
Posts: 37
Joined: Thu Jan 11, 2024 8:49 am

Re: [Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by sx090 »

The link from Post #1 is still accessible (even for me in Incognito Browsermode).
https://www.dropbox.com/scl/fo/tcy5yo0c ... ft6ud&dl=0
User avatar
xnview
Author of XnView
Posts: 46362
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by xnview »

Thanks, i've tried with your sample file, and it works. No action added. Do you use latest version?
Clipboard-1.jpg
Clipboard-1.jpg (67.16 KiB) Viewed 115 times
Pierre.
sx090
Posts: 37
Joined: Thu Jan 11, 2024 8:49 am

Re: [Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by sx090 »

Did you use "JPG - JPGli"?

I tried it again, with my actions deactivated, and the following settings (for JPGLi):
2025-07-09_07h40_32.jpg
2025-07-09_07h40_32.jpg (119.56 KiB) Viewed 96 times
Here's the Log and the demo of before/after Thumbnails:
2025-07-09_07h41_11.jpg
2025-07-09_07h41_11.jpg (164.17 KiB) Viewed 96 times
Yes, using "XnConvert Version 1.105.0 - windows x64 (Apr 16 2025) - Libformat version 7.221".

I then tried the regular "JPG" format as target format, and it worked properly....
Could this be due to JPEGLI format?!

Thanks!
User avatar
xnview
Author of XnView
Posts: 46362
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.
sx090
Posts: 37
Joined: Thu Jan 11, 2024 8:49 am

Re: [Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by sx090 »

Ahh, I saw this is mentioned as Fix for XnViewMP.
In XnViewMP at least I have a "workaround" because as mentioned in the first post, when using the separate "“Rotate based on EXIF orientation field” and afterwards “Rebuild EXIF thumbnails” functions it works as expected already.

The thing is: I don't use XnViewMP for image compression / organization, but XnConvert as Standalone.

Can you also fix it for the XnConvert standalone version?

Thanks so far!
User avatar
xnview
Author of XnView
Posts: 46362
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by xnview »

sx090 wrote: Wed Jul 09, 2025 9:59 am Can you also fix it for the XnConvert standalone version?
It will be fixed in XnConvert too
Pierre.
sx090
Posts: 37
Joined: Thu Jan 11, 2024 8:49 am

Re: [Bug in XnConvert] XnConvert - Rotate based on EXIF orientation

Post by sx090 »

Awesome, thanks! Good and quick work, amazing
Post Reply