Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

FeriM
Posts: 5
Joined: Fri Nov 24, 2017 7:32 pm

Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by FeriM »

Subject: 0.88: <Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180>

XnView: MP 0.88 - 64 bit
OS: Windows 64bit

<Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180.>

Effect: <Thumbnail and Image Orientation out of sync >

To reproduce:
1. Consider a Jpeg having a rotation of bottom-right (3) in Orientation, both for Image and Thumbnail
2. Browser->Jpeg lossless transformation->Rotate 180 (or make a Reset EXIF Orientation Field)
3.
Actual behaviour (bug): <Current wrong behaviour of XnView> :bug:
The EXIF Orientation tag for Image is set to top-left (1) , but the EXIF Orientation tag for Thumbnail remains bottom-right (3)

Expected behavior:
I would expect the Orientation for the Thumbnail to be synced to the Orientation for the Image (like it happens when rotating to 90).
After this operation, even using Metadata->EXIF Thumbnail Rebuild does not change the Thumbnail Orientation tag to match the orientation of the image.
I am not sure where the Orientation tag for the Thumbnail is used so I cannot see implications further.
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by xnview »

please send me the jpeg used?
Pierre.
FeriM
Posts: 5
Joined: Fri Nov 24, 2017 7:32 pm

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by FeriM »

http://picpaste.com/DSC_0007-pYkG0Dvs.JPG

Just to make it clear... the picture and the thumbnail are not displayed with opposite orientation after the operation, but the Thumbnail Orientation flag and the Image Orientation flag do not match after the operation.
Actually the same thing happens on other operations like resize.
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
picture
Pierre.
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by xnview »

See issue for current status and some details.
Pierre.
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by xnview »

This problem is supposed to be fixed in XnView MP 0.91. Please check and confirm the bug fix here.
Pierre.
HanVroon
Posts: 218
Joined: Thu Jan 28, 2010 7:30 am

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by HanVroon »

Tested with 0.91 beta 4.
I had an issue with this thumb orientation issue for a long time and my workflow has been to switch OFF Settings, General, tab General, "Rotate images according to EXIF orientation tag" before every time I wanted to adjust portrait images (adjusting levels mostly).
I was hoping that this issue would be fixed now, but unfortunately it seems still the same..

First tested with 0.90
Take a portrait image, rotate with JPEG lossless transformations (or just the rotate buttons in the toolbar). Picture and thumb are rotated.
Edit a portrait image, change levels, Save with overwrite, the picture is portrait, the thumb is rotated to landscape.
I did not check exif orientation tags, because in my files there is no thumb orientation tag, just picture orientation.

Then tested with 0.91 beta 4
The behavior is exactly the same. Lossless rotate works, thumb and image are rotated, edit and save leaves us with a correct orriented image but wrong oriented thumbail.
One thing I have noticed is that portrait pictures are saved as portrait files, like in Photoshop, and not as landscape files with a portrait orientation bit.
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by xnview »

HanVroon wrote: Sat Jul 21, 2018 9:14 am First tested with 0.90
Take a portrait image, rotate with JPEG lossless transformations (or just the rotate buttons in the toolbar). Picture and thumb are rotated.
Edit a portrait image, change levels, Save with overwrite, the picture is portrait, the thumb is rotated to landscape.
I did not check exif orientation tags, because in my files there is no thumb orientation tag, just picture orientation.
please send the picture file used?
Pierre.
HanVroon
Posts: 218
Joined: Thu Jan 28, 2010 7:30 am

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by HanVroon »

Hi Pierre,

Stupid question: how do I send you a file?

By the way, to make shure that it is not a thumbnail cache problem, after saving the modified portrait file I closed XnViewMP and deleted Thumb.db and XnView.db, then started XnViewMP again (thumbnail was landscape, View mode still portrait.
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by xnview »

by PM or on contact @ xnview . com
Pierre.
HanVroon
Posts: 218
Joined: Thu Jan 28, 2010 7:30 am

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by HanVroon »

I sent a sample file via email (sorry, used that before, forgot). Couldn't find the option to send a file in PM.
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by xnview »

HanVroon wrote: Wed Aug 08, 2018 3:30 pm I sent a sample file via email (sorry, used that before, forgot). Couldn't find the option to send a file in PM.
Strange, i can't reproduce
Pierre.
HanVroon
Posts: 218
Joined: Thu Jan 28, 2010 7:30 am

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by HanVroon »

As you say: Right...

So that made met test with a fresh download on my test VM, so without my xnview.ini.
And then I can't reproduce eighter.
Then I remembered that I always have "Rebuild embedded EXIF thumbnail" unchecked in Format settings, Write tab, JPEG tab.
Tested by unchecking that setting in the test VM, then I can reproduce.

I prefer not rebuilding embedded thumbnails, only do that in special occasions.

So now is the question: how are portrait pictures saved after modifying?
I notice that before saving the size of my sample picture is 3744x5616, after saving it is 5616x3744, so height and width are flipped, and the EXIF orientation tag is reset from 8 to 1.
I remember that behavior from Photoshop.
Is that a general behavior when portrait pictures are modified and saved?
I believe not, because when I modify a portrait picture with first unchecking Settings, General, Rotate images according to EXIF orientation tag, and then save, the thumbnail and image orientation stay the same (that is my current procedure).
So my current procedure is:
1. Uncheck Rotate images according to EXIF orientation tag.
2. Close XnViewMP.
3. Start XnViewMP, modify the portrait picture with pain in my neck, save the picture.
4. Check Rotate images according to EXIF orientation tag again.
5. Close and start XnViewMP again.
(cloosing and starting XnViewMP between changing the setting is necessary because the thumbnail orientation does not refresh)

So, I have no idea if you can fix this for users who have "Rebuild embedded EXIF thumbnail" unchecked.
User avatar
xnview
Author of XnView
Posts: 44761
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by xnview »

HanVroon wrote: Thu Aug 09, 2018 10:55 am So, I have no idea if you can fix this for users who have "Rebuild embedded EXIF thumbnail" unchecked.
no you need it
Pierre.
HanVroon
Posts: 218
Joined: Thu Jan 28, 2010 7:30 am

Re: Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180

Post by HanVroon »

FeriM wrote: Fri Nov 24, 2017 7:56 pm Subject: 0.88: <Thumbnail and Image Orientation out of sync after Jpeg Lossless Rotate to 180>

Actual behaviour (bug): <Current wrong behaviour of XnView> :bug:
The EXIF Orientation tag for Image is set to top-left (1) , but the EXIF Orientation tag for Thumbnail remains bottom-right (3)
OK, I'll stick to my procedure then. Maybe FeriM can test, I don't have bottom-right oriented pictures....