Page 1 of 2

Photos are rotated after saving

Posted: Tue Jan 15, 2019 9:20 pm
by Octopuss
I have some photos from my phone that display in correct orientation when I open them with Xn, but after let's say I crop them a little and save and reload them, they are suddenly rotated to landscape shape.
Does anyone know why is it happening and what can I do? Are there any settings I missed?

Re: Photos are rotated after saving

Posted: Mon Feb 04, 2019 12:49 pm
by xnview
could you send me a sample file?

Re: Photos are rotated after saving

Posted: Sun Feb 17, 2019 6:18 pm
by Octopuss
I will when I manage to trigger it again.
I think it only happens with photos from a mobile. Something about the orientation flag getting messed up I believe.

Re: Photos are rotated after saving

Posted: Tue Mar 05, 2019 11:41 am
by Octopuss
Found one.
The photo was showing correctly until I resized it - then it flipped 90° to the right.

Re: Photos are rotated after saving

Posted: Mon Mar 11, 2019 3:56 pm
by xnview
the file that you sent is landscape

Re: Photos are rotated after saving

Posted: Wed Mar 27, 2019 11:22 am
by kosmoletec
I have the same problem. I really like XnView and use it for years but after I started using Mac (OS X) this happens to me all the time and it is extremely annoying.

Steps to reproduce (only on OS X?):
1) Open photo in portrait orientation
2) Make any change (crop, contrast, ...)
3) Save photo
4) Open the photo again - it is in landscape orientation

I usually spend a lot of time by trying to fix this (rotate photo back to portrait and save). Because of the bug it is usually not easy (again rotated back to landscape). Often I have to rotate the pohoto back like 10 times before I finally open it in portrait mode.

Re: Photos are rotated after saving

Posted: Mon Apr 01, 2019 11:07 am
by xnview
kosmoletec wrote: Wed Mar 27, 2019 11:22 am I have the same problem. I really like XnView and use it for years but after I started using Mac (OS X) this happens to me all the time and it is extremely annoying.

Steps to reproduce (only on OS X?):
1) Open photo in portrait orientation
2) Make any change (crop, contrast, ...)
3) Save photo
4) Open the photo again - it is in landscape orientation

I usually spend a lot of time by trying to fix this (rotate photo back to portrait and save). Because of the bug it is usually not easy (again rotated back to landscape). Often I have to rotate the pohoto back like 10 times before I finally open it in portrait mode.
could you send me a file to try to reproduce?

Re: Photos are rotated after saving

Posted: Tue Apr 02, 2019 8:40 am
by kosmoletec
could you send me a file to try to reproduce?
Here is a photo I opened in portrait mode, changed contrast on it and saved.

Edit: here the picture looks like it actually is in portrait orientation but try to open the picture in new tab or in XnView/any other app.

Re: Photos are rotated after saving

Posted: Mon Apr 15, 2019 12:20 pm
by xnview
kosmoletec wrote: Tue Apr 02, 2019 8:40 am Here is a photo I opened in portrait mode, changed contrast on it and saved.
do you have the original one? the attached file has a bad EXIF orientation field...

Re: Photos are rotated after saving

Posted: Mon Apr 15, 2019 8:14 pm
by kosmoletec
No, I overwrote original with this one.
I am sending another one - original and saved in XnView after contrast is changed.

Re: Photos are rotated after saving

Posted: Tue Apr 16, 2019 9:01 am
by xnview
kosmoletec wrote: Mon Apr 15, 2019 8:14 pm I am sending another one - original and saved in XnView after contrast is changed.
I can't reproduce, 'settings>general>Rotate images according EXIF' is checked?

Re: Photos are rotated after saving

Posted: Sat Apr 20, 2019 6:17 am
by kosmoletec
Yes, checked. I doubt I changed anything from default settings.
Today I noticed that this bug most likely happens only on pictures bigger than ca. 3 MB. I cannot reproduce it on smaller images.

Re: Photos are rotated after saving

Posted: Tue Apr 23, 2019 7:06 am
by xnview
kosmoletec wrote: Sat Apr 20, 2019 6:17 am Yes, checked. I doubt I changed anything from default settings.
Today I noticed that this bug most likely happens only on pictures bigger than ca. 3 MB. I cannot reproduce it on smaller images.
you can ALWAYS reporoduce it on this picture file? could you send me your xnview.ini?

Re: Photos are rotated after saving

Posted: Wed May 19, 2021 3:36 pm
by Octopuss
This stuff still keeps happening to me randomly. I'd have a bunch of photos from my phone that display properly, but when I resize them, the EXIF orientation flag is changed (that's what I think is happening).
Of course when I intentionally take a bunch of random photos and try to replicate the problem it doesn't happen.

I'll backup all photos from now on and see if I can find any examples.

Re: Photos are rotated after saving

Posted: Wed May 19, 2021 4:33 pm
by michel038
Rotate photos is sometimes tricky, because (1)exif tag or (2)embedded thumbnail or (3)preview in cache or (4)full photo, can have different orientations

Select a photo (not fullscreen or display mode, but in the browser) where the problem occurs and try these steps :

- Uncheck "Settings, General, Rotate images according EXIF"
- Uncheck "Settings, Browser, Misc, Change Exif orientation only"
- Rebuild exif thumbnail (Tools, Metadata >)
- Click on "View, Rebuild thumbnails" menu

Now, the photo and its thumbnail have same orientation (check if the view mode or fulscreen show the same orientation)

- If this orientation is wrong, use "lossless rotation" ...
I think the problem should disappear for this photo ?
even if settings are set to their previous value ...