Page 1 of 1
Question to various rotate
Posted: Fri Jun 24, 2016 7:55 pm
by herb
Hello,
I work with XnViewMP 0.80.
Customizing my toolbars I have seen that for rotate90/180/270 XnViewMP has the possibility to select 2 (different) commands:
- cmd_rotate90/180/270 and
- cmd_lrotate90/180/270 (with a "l" before rotate)
Can someone explain to me what is the difference between the 2 commands?
Which command is used by menu in browser mode and which command is used by menu in view mode?
Thanks in advance
Best regards
Herb
Re: Question to various rotate
Posted: Sat Jun 25, 2016 4:30 am
by XnTriq
Hello Herb
While
cmd_rotate* can be used on
all image formats, the
cmd_lrotate* commands (
Tools »
JPEG lossless transformations) only work for JPEG files.
The behavior of the “regular” rotate commands is customizable:
- Tools » Settings...
- General » File operations » Keep original date/time
- Browser » Misc. » Rotation
- Change EXIF orientation ONLY (if possible)
- Use lossless rotation (if possible)
Re: Question to various rotate
Posted: Sun Jun 26, 2016 9:33 am
by herb
Hello XnTriq,
thanks for quick reply.
My interpretation of "lossless rotation" is as follows:
- pixels of the *.jpg file are rearranged
- exif tag orientation remains unchanged
- tags image-width and image-height are exchanged ( in case of rotate +90/-90)
Taking this as the criteria I do not agree to your info:
Tools » Settings... -> General » File operations » Keep original date/time: (always) Lossless transformations
I have checked all (3) checkboxes for these settings and
I performed a rotation-"change EXIF orientation only" with cmd_rotate (without l).
So I suggest the date/time change does not depend on the rotate method.
Best regards
Herb
Re: Question to various rotate
Posted: Sun Jun 26, 2016 7:30 pm
by XnTriq
herb wrote:My interpretation of "lossless rotation" is as follows:
- pixels of the *.jpg file are rearranged
- exif tag orientation remains unchanged
- tags image-width and image-height are exchanged ( in case of rotate +90/-90)
Yes, the EXIF orientation tag should only be reset to 1 (top/left), if we use
cmd_lrotateExif (
Rotate based on EXIF orientation field = rearranging of pixels = “
transcoding”) or
cmd_lresetExif (pixels are
not rearranged).
herb wrote:Taking this as the criteria I do not agree to your info:
Tools » Settings... -> General » File operations » Keep original date/time: (always) Lossless transformations
I have checked all (3) checkboxes for these settings and
I performed a rotation-"change EXIF orientation only" with cmd_rotate (without l).
So I suggest the date/time change does not depend on the rotate method.
Sorry, I'm not sure if I understand correctly. Do you mean that the info isn't correct or that there's a bug?
XnView Classic (for comparison):
Re: Question to various rotate
Posted: Sun Jun 26, 2016 8:45 pm
by XnTriq
- Download Karl02's suite of test images (exif-orientation-testimages-v2.rar).
- Extract F2_5.jpg (EXIF orientation: 5 = left/top).
- Remove the write protection attribute from F2_5.jpg.
- Make a copy of F2_5.jpg.
- Rename F2_5.jpg to cmd_rotate90.jpg,
and Copy of F2_5.jpg to cmd_lrotate90.jpg.
- Start XnViewMP.
- Make sure the following settings are activated:
- General » File operations » Keep original date/time
- Browser » Misc. » Rotation
- Change EXIF orientation ONLY (if possible)
- Use lossless rotation (if possible)
- Select the thumbnail of cmd_lrotate90.jpg in the browser and hit Ctrl+Shift+R (= cmd_lrotate90).
- Warning message: “JPEG lossless operation will modify original file(s), and may remove some unused pixels (width and height must be multiple of 8 pixels)! Do you want to continue?”
- The image is rotated 90° clockwise.
- The dimensions are changed from W255×H239 to W224×H255.
- The EXIF orientation flag is reset to 1 (top/left).
- The file's timestamp remains the same.
- Select the thumbnail of cmd_rotate90.jpg in the browser and click the Rotate clockwise (= cmd_rotate) button on the main toolbar.
- No changes are made to the file

Expected behavior: Steps 8a through 8e
Re: Question to various rotate
Posted: Mon Jun 27, 2016 9:29 am
by herb
Hello XnTriq,
again thanks for your detailed answers.
And Yes I performed some more tests as you described in your last post.
Also the following part of your first answer is now clear to me:
Tools » Settings... » General » File operations » Keep original date/time
Lossless transformations
I works as expected:
- In case of "keep date/time" is unchecked, XnViewMP does not perform a lossless rotation by itself.
- You can also perform a rotation with only exif:orientation changed.
But the problem is the following reading of metadata:
Because file creation-date of file in filesystem and "exif:data/time original" is different,
XnViewMP always displays exif:date taken with value 1=normal=topleft
(Exiftool display the correct value after a rotation)
So I agree: in this case alsways a lossless rotation should be performed by user.
Question: Is the above described problem a known issue or do we have to open another topic?
Thanks again and
Best regards
Herb
Re: Question to various rotate
Posted: Mon Jul 11, 2016 1:45 am
by XnTriq
Sorry for the delay, Herb
herb wrote:Also the following part of your first answer is now clear to me:
Tools » Settings... » General » File operations » Keep original date/time
Lossless transformations
I works as expected:
- In case of "keep date/time" is unchecked, XnViewMP does not perform a lossless rotation by itself.
- You can also perform a rotation with only exif:orientation changed.
Thanks for confirming!
herb wrote:But the problem is the following reading of metadata:
Because file creation-date of file in filesystem and "exif:data/time original" is different,
XnViewMP always displays exif:date taken with value 1=normal=topleft
(Exiftool display the correct value after a rotation)
I see you've posted a bug report (
EXIF:orientation is always top-left(1)), …
herb wrote:Question: Is the above described problem a known issue or do we have to open another topic?
… and so did I (
"cmd_rotate" & "Change EXIF orientation ONLY")
