Page 1 of 1

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

Posted: Tue Jun 24, 2025 2:43 pm
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

Re: XnConvert - Rotate based on EXIF orientation

Posted: Tue Jun 24, 2025 4:01 pm
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

Re: XnConvert - Rotate based on EXIF orientation

Posted: Wed Jun 25, 2025 6:25 am
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

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

Posted: Wed Jul 02, 2025 12:15 pm
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 :)

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

Posted: Mon Jul 07, 2025 7:48 am
by xnview
Please update the link of you sample file, no more available

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

Posted: Mon Jul 07, 2025 9:16 am
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

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

Posted: Tue Jul 08, 2025 6:26 am
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 131 times

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

Posted: Wed Jul 09, 2025 5:44 am
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 112 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 112 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!

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

Posted: Wed Jul 09, 2025 8:33 am
by xnview
:bugconfirmed: Thanks to your detailed description I can reproduce the problem.

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

Posted: Wed Jul 09, 2025 9:59 am
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!

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

Posted: Wed Jul 09, 2025 1:07 pm
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

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

Posted: Wed Jul 09, 2025 3:13 pm
by sx090
Awesome, thanks! Good and quick work, amazing