cropping image to portrait

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Post Reply
Gregnut
Posts: 8
Joined: Fri Oct 12, 2018 3:27 pm

cropping image to portrait

Post by Gregnut »

When I crop a landscape image to portrait, the image is saved sideways (landscape). I then rotate the image through 90degrees and save it - but the next time I look at it it has reverted to landscape. Can I do anything about this?
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: cropping image to portrait

Post by xnview »

could you send me the original file, and the way to reproduce the problem?
Pierre.
ebergerxn
Posts: 13
Joined: Sun Nov 17, 2019 3:36 pm

Re: cropping image to portrait

Post by ebergerxn »

I have been emailing Pierre about this one. It is quite annoying and I have reproduced it on two different Win10 computers using versions from 0.92 up to 0.94. It happens to me about 10-20% of the time. I import images from a camera, like an iPhone, in jpg format. When I crop them as I often like to do, to get just the image I want, and save them, they rotate 90 deg, sometimes 180 deg. I can then open the rotated image, rotate it back to the proper orientation, and save and they are usually ok. But sometimes even that doesn't work and I have to open and rotate them multiple times until they save with the proper orientation.

Usually the thumbnail is rotated in the same way as the picture when it opens, but this morning for the first time, the image rotated 180 deg, but the thumbnail looked just fine.

I have sent Pierre numerous original and rotated images but he has been unable to reproduce the problem. Myself, I cannot consistently reproduce it. When I get an image that rotates, I go back to the original and try to crop it identically, and usually it will not experience the rotation a second time.

I was so glad to read at least one confirming post. Is anyone else experience this problem?
cday
XnThusiast
Posts: 4396
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: cropping image to portrait

Post by cday »

Could this possibly be a metadata problem:

Sometimes a value present in the file may be removed when saving, not my subject though...
ebergerxn
Posts: 13
Joined: Sun Nov 17, 2019 3:36 pm

Re: cropping image to portrait

Post by ebergerxn »

If you are correct, that sounds like a program bug, or are you suggesting some type of user error?
cday
XnThusiast
Posts: 4396
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: cropping image to portrait

Post by cday »

ebergerxn wrote: Thu Jan 23, 2020 6:22 pm If you are correct, that sounds like a program bug, or are you suggesting some type of user error?
Metadata is not my subject as I said, but AFAIK some image files contain orientation data which, according to the save settings used, may not be retained when the modified file is saved.

Perhaps you could upload an example file, in a ZIP or similar archive to ensure that it can be downloaded without any risk of having been stripped of metadata when uploaded, if that could be a risk.

Maybe someone can then test the file if you post simple instructions to reproduce...

Edit:

In XnView MP the save settings are rather hidden: in the viewer File > Format settings - Write tab and there are options to save, or not, several types of metadata. You might take a look if you haven't already done so, and if appropriate retest with different settings...
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: cropping image to portrait

Post by michel038 »

Rotation is a tricky problem ...
When I encounter such a problem, I disable the automatic rotation (settings, general), renew the thumbnail (Tools, metadata, rebuild) and rotate the photo in the right position ...

There is an old thread here : viewtopic.php?f=62&t=30709
ebergerxn
Posts: 13
Joined: Sun Nov 17, 2019 3:36 pm

Re: cropping image to portrait

Post by ebergerxn »

Thank you for the discussions and especially the link to the other prior discussions on rotation. I am using 0.94 and still have the same problems of images intermittently rotating. I haven't uploaded any test images, since curiously my problem seems to only occur once, i.e., when I crop an image and it rotates, which happens on about 10% of the images I crop, I have gone back to the original, and cropped it to the exact same dimensions and I can never get it to occur a second time. Does that give anyone a clue?

I have sent numerous images to Pierre and he can not reproduce what I find happening.

At Tools/Settings/General I have "rotate images according to EXIF orientation tag" checked. Should I uncheck that box?

Also, I just did a test and rotated a pix 90 deg clockwise. Before and after the rotation I opened properties and under ExifTool, looked at the Orientation setting under the EXIF category. Both times it read "Horizontal (normal)." Is that correct? I would have thought after rotation it would have read something else.
Post Reply