Page 1 of 1
JPEG Lossless Rotate failed
Posted: Sun Nov 29, 2009 2:42 pm
by BrokenAutoImageSize
XnView 1.96.5.
I have a bunch of JPEG from my camera with EXIF orientation flag set.
XnView shipped to me with checked option "Rotate images based on EXIF orientation", and all works fine.
Now I prepare a photos CDROM for another peoples. I didn't sure that they have XnView installed with correct options and even they even as know about XnView, so I go to Windows Explorer, turn Thumbnails view mode and see that some images have raw image data and cant be viewed without rotation.
I return to XnView, select JPEG image with picture rotated counter clockwise from normal orientation and press "Rotate Clockwise button", image rotates by 180 degrees.
Then I press "Rotate Counter Clockwise" and image becomes OK.
Searching brings me that topic about crazy rotations:
http://newsgroup.xnview.com/viewtopic.php?f=36&t=18029
My suggestions:
1. By pressing "Rotate" buttons I mean that XnView will not show extra-AI-manipulating-EXIF-flags to me but throws away EXIF data, takes raw image data, rotate it in specified direction and write back to same file.
2. Early I saw ACDSee program which have a simple flag in rotate dialog: "rotate based on EXIF orientation", it works brilliant.
Please add this simple option to Rotate Transformation "[x] rotate based on EXIF orientaton"
3. About "XnView only rewrites EXIF flag instead of rotation" issue: there will be another clear option:
[x] rewrite EXIF orientation instead of rotate if possible
so all the users takes predictable results.
Thank you.
P.S. sorry for my English

Re: Rotate failed
Posted: Mon Nov 30, 2009 9:01 am
by xnview
BrokenAutoImageSize wrote:
2. Early I saw ACDSee program which have a simple flag in rotate dialog: "rotate based on EXIF orientation", it works brilliant.
Please add this simple option to Rotate Transformation "[x] rotate based on EXIF orientaton"
You have 'rotate based on EXFI value'
3. About "XnView only rewrites EXIF flag instead of rotation" issue: there will be another clear option:
[x] rewrite EXIF orientation instead of rotate if possible
The label is changed in 1.97
Re: Rotate failed
Posted: Mon Nov 30, 2009 10:14 am
by BrokenAutoImageSize
Thank you, waiting for 1.97 release
Re: Rotate failed
Posted: Thu Jun 10, 2010 7:53 pm
by BrokenAutoImageSize
Nothing changed in 1.97.4 release:
take orientation values from
http://www.impulseadventure.com/photo/e ... ation.html
What I do:
- I see an image rotated in position (8).
- I press button "Rotate Left" or press Ctrl-Shift-L
- XnView rotate and redraw image to position (6).
- I press button "rotate right"
- XnView rotate image and it become to correct position (1)
I mean it will be easy to program simple rotation algorithm

Re: Rotate failed
Posted: Fri Jun 11, 2010 7:49 am
by xnview
Could you send me the jpeg file?
Re: Rotate failed
Posted: Mon Jul 05, 2010 8:00 am
by bucky
I get the same exact behavior in XnView 1.97.6, running on XP SP3. Here is how to reproduce:
XnView settings:
general > operations: uncheck "Rotate images according to EXIF orientation tag"
browser > misc: uncheck "Change EXIF orientation ONLY when possible (JPEG)"
browser > misc: check "Use lossless rotation when possible (JPEG)"
Original image:
EXIF orientation: right-top (6)
Action: Tools > JPEG Lossless Transformation > Rotate 90 right
Result is 180 degree lossless rotate, and the EXIF orientation is now top-left (1)
If I then do a Lossless Rotate 90 left, then it's correct. I think the lossless rotate works correctly when EXIF orientation is "top-left (1)", but does not work correctly when the original orientation is something else.
Re: Rotate failed
Posted: Mon Jul 05, 2010 5:35 pm
by BrokenAutoImageSize
AFAIK from Pierre (author of xnview) this bug will fixed in future version.
If you want to work fine at current version, check the
[x] option/General/File operations>For losseless operation make a backup
but xnview will left original JPEG files on disk.
Re: Rotate failed
Posted: Mon Jul 05, 2010 8:44 pm
by marsh
If Exif orientation was wrong in first place, the first pass will always reset to top left to correct it and then a second pass will look as expected?
A problem of jpeg transform dialog in viewer using Exif orientation when it wasn't supposed to (with following option) was fixed recently.
General [ ]Rotate images according to exif orientation flag.
This option is good one to leave off if anyone has jpg with flag that doesn't match image, IMO.
Re: Rotate failed
Posted: Mon Jul 05, 2010 8:56 pm
by BrokenAutoImageSize
But some people preferred to have all their images was correctly rotated in Top-Left (1) position.

Re: Rotate failed
Posted: Tue Jul 06, 2010 1:29 am
by bucky
@BrokenAutoImageSize: Changing that setting works. Interesting.
@Marsh: The EXIF orientation was not incorrect. I took a "portrait" photo, which my camera marked correctly as "right-top (6)". I already had the setting off: General [ ]Rotate images according to exif orientation flag.
Re: Rotate failed
Posted: Tue Jul 06, 2010 11:36 am
by marsh
@BrokenAutoImageSize @bucky
Ok. I can confirm problems too.
Here is what happens on first pass (rotating with browser toolbar buttons) when Exif flag reads 8,3, or 6 and it doesn't match origin (top-left) shown in properties tab:
A.
[x]rotate according to exif [ ]change exif only; (default settings)- rotating clockwise or counterclockwise: nothing unusual seen but...
-viewing according to exif, but no change to it is sought*
B.
[ ]rotatate according to exif [ ]change exif only;- rotating clockwise: Exif 8, no view shift seen; Exif 3, shifts 270 degrees; Exif 6, shifts 180
-not viewing according to exif flag, but no change to it is sought*; and it isn't being bypassed*
C.
[x]rotatate according to exif [x]change exif only; - rotating clockwise or counterclockwise: nothing unusual seen
-viewing according to flag and not changing image content
D.
[ ]rotatate according to exif [x]change exif only; - nothing seen
-not viewing according to flag, but changing it anyway
I think these ideas are already found in transformation dialog. Good as defaults elsewhere?
1. not reset exif
2. ignore exif data when not viewing according to it.
Re: Rotate failed
Posted: Tue Jul 06, 2010 6:23 pm
by BrokenAutoImageSize
My friend wrote a little utility for cleaning directory:
http://code.activestate.com/recipes/577 ... e-utility/
Written in Python (
http://python.org/)
Re: Rotate failed
Posted: Tue Sep 07, 2010 12:29 pm
by xnview
Re: Rotate failed
Posted: Tue Sep 07, 2010 12:51 pm
by BrokenAutoImageSize
Suppose that new version works fine!
Thank you!
Re: Rotate failed
Posted: Thu Sep 09, 2010 12:42 pm
by Hacker
Yay, confirmed working in 1.97.7!
Thanks!
Roman