Question to various rotate

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

Moderators: helmut, xnview

Post Reply
herb
Posts: 281
Joined: Sat Jul 18, 2009 3:19 pm

Question to various rotate

Post 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
User avatar
XnTriq
Forum Librarian
Posts: 6517
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Question to various rotate

Post 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
      • Lossless transformations
    • Browser » Misc. » Rotation
      • Change EXIF orientation ONLY (if possible)
      • Use lossless rotation (if possible)
herb
Posts: 281
Joined: Sat Jul 18, 2009 3:19 pm

Re: Question to various rotate

Post 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
User avatar
XnTriq
Forum Librarian
Posts: 6517
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Question to various rotate

Post 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):
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=108494#p108494]Keep file date/time does not work[/url]) wrote:There are actually three settings:
  1. Tools » Options... » General » File Operations » Keep date/time for saving
  2. Tools » Options... » Browser » Misc. » Rotation » Keep original date/time attributes
  3. Tools » Batch Processing... » Output » Keep original date/time attributes
Related topics:
Olivier_G ([url=http://newsgroup.xnview.com/viewtopic.php?p=41920#p41920]Options Revolution finds it way into 1.90[/url]) wrote:- 'Keep original date/time attributes' is unnecessary, IMO, as already available in GENERAL>File Operations ('keep date/time for saving').
- What is 'Use Lossless rotation when possible (JPEG)' for?
User avatar
XnTriq
Forum Librarian
Posts: 6517
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Question to various rotate

Post by XnTriq »

  1. Download Karl02's suite of test images (exif-orientation-testimages-v2.rar).
  2. Extract F2_5.jpg (EXIF orientation: 5 = left/top).
  3. Remove the write protection attribute from F2_5.jpg.
  4. Make a copy of F2_5.jpg.
  5. Rename F2_5.jpg to cmd_rotate90.jpg,
    and Copy of F2_5.jpg to cmd_lrotate90.jpg.
  6. Start XnViewMP.
  7. Make sure the following settings are activated:
    • General » File operations » Keep original date/time
      • Lossless transformations
    • Browser » Misc. » Rotation
      • Change EXIF orientation ONLY (if possible)
      • Use lossless rotation (if possible)
  8. Select the thumbnail of cmd_lrotate90.jpg in the browser and hit Ctrl+Shift+R (= cmd_lrotate90).
    1. 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?”
    2. The image is rotated 90° clockwise.
    3. The dimensions are changed from W255×H239 to W224×H255.
    4. The EXIF orientation flag is reset to 1 (top/left).
    5. The file's timestamp remains the same.
  9. 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 :bug:
      Expected behavior: Steps 8a through 8e
herb
Posts: 281
Joined: Sat Jul 18, 2009 3:19 pm

Re: Question to various rotate

Post 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
User avatar
XnTriq
Forum Librarian
Posts: 6517
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Question to various rotate

Post 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") ;-)
Post Reply