Difference between rotation and lossless rotation?

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

Moderators: helmut, XnTriq, xnview

andrea.ippo
Posts: 100
Joined: Sat Jan 05, 2008 2:05 pm

Difference between rotation and lossless rotation?

Post by andrea.ippo »

Can someone tell me what it is?
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: Difference between rotation and lossless rotation?

Post by marsh »

The browser option. With jpeg, Pierre uses a special method to directly rotate image without the need of re-saving it first. Avoiding a loss in content (which is the case when people re-save same jpeg over and over at 75% setting, as an example).
Normal rotation is also lossless if the format (like png) is also lossless one (unlike jpeg).
andrea.ippo
Posts: 100
Joined: Sat Jan 05, 2008 2:05 pm

Re: Difference between rotation and lossless rotation?

Post by andrea.ippo »

marsh wrote:The browser option. With jpeg, Pierre uses a special method to directly rotate image without the need of re-saving it first. Avoiding a loss in content (which is the case when people re-save same jpeg over and over at 75% setting, as an example).
Normal rotation is also lossless if the format (like png) is also lossless one (unlike jpeg).
So please tell me if I'm right.
Assuming I'm only interested in handling JPEGs:

in browser view, the "simple" rotation is equivalent to the one accessible via the "lossless jpeg transformations" button, and immediately saves the changes to the file. Thus, in this view you can use both commands
In the other view, the "simple" rotation is not lossless, but uses the compression % set in the options for the JPEG format, and the original file is unchanged until you overwrite it by saving changes. In this view, the only way to achieve lossless rotation is by clicking the "lossless jpeg transformations" button. In this case, again, the changes are immediately applied to the original file

Can you confirm?
Thanks
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: Difference between rotation and lossless rotation?

Post by marsh »

andrea.ippo wrote:
marsh wrote:The browser option. With jpeg, Pierre uses a special method to directly rotate image without the need of re-saving it first. Avoiding a loss in content (which is the case when people re-save same jpeg over and over at 75% setting, as an example).
Normal rotation is also lossless if the format (like png) is also lossless one (unlike jpeg).
So please tell me if I'm right.
Assuming I'm only interested in handling JPEGs:

in browser view, the "simple" rotation is equivalent to the one accessible via the "lossless jpeg transformations" button, and immediately saves the changes to the file. Thus, in this view you can use both commands
In the other view, the "simple" rotation is not lossless, but uses the compression % set in the options for the JPEG format, and the original file is unchanged until you overwrite it by saving changes. In this view, the only way to achieve lossless rotation is by clicking the "lossless jpeg transformations" button. In this case, again, the changes are immediately applied to the original file

Can you confirm?
Thanks
Yes for both. You have choice of 2 methods in browser view (which change file immediately).
Options>Browser>Misc>[x]Use Lossless rotation when possible (JPEG)
andrea.ippo
Posts: 100
Joined: Sat Jan 05, 2008 2:05 pm

Re: Difference between rotation and lossless rotation?

Post by andrea.ippo »

All right, thank you
Dreamer
XnThusiast
Posts: 4608
Joined: Sun Jul 25, 2004 9:08 pm

Re: Difference between rotation and lossless rotation?

Post by Dreamer »

Just a hint - you may use the (hidden) keyboard shortcut Ctrl+Right (or Left) to rotate the image in viewer and fullscreen (edit mode only) - when using together with Left/Right to go to prev./next image it's possibly the best way to quickly rotate images.

Also try the option in the "lossless jpeg transformations" button menu > "Rotate based on EXIF value". First select all files in browser (Ctrl+A), then use this option. It's not working with all pictures, in that case you'll have to do it manually.
Dreamer
aussenboarder
Posts: 17
Joined: Sat Jul 01, 2006 11:34 pm
Location: Berlin

Re: Difference between rotation and lossless rotation?

Post by aussenboarder »

hello.
just to make sure i understand right:

the rotation cw/ccw buttons ...
Image
... that are available in the browser and the viewer
both rotate any jpeg file in lossless mode when the option ...
browser / misc / use lossless rotation when possible (jpeg) is checked?

so the 2 buttons are doing the same operation as the jpeg lossless transformation ...
Image
... would do for jpeg files.

can you please confirm or confute?!
cheers, aussenboarder
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Difference between rotation and lossless rotation?

Post by xnview »

If you have checked browser / misc / use lossless rotation when possible (jpeg), the rotation in browser make a lossless rotation on jpeg
Pierre.
aussenboarder
Posts: 17
Joined: Sat Jul 01, 2006 11:34 pm
Location: Berlin

Re: Difference between rotation and lossless rotation?

Post by aussenboarder »

@Pierre
is there a reason that the same does not apply to the viewer?
Dreamer
XnThusiast
Posts: 4608
Joined: Sun Jul 25, 2004 9:08 pm

Re: Difference between rotation and lossless rotation?

Post by Dreamer »

aussenboarder wrote:@Pierre
is there a reason that the same does not apply to the viewer?
Confirmed - but rotation doesn't work at all also in Browser - even is that option is disabled, using toolbar buttons. :?
Dreamer
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Difference between rotation and lossless rotation?

Post by xnview »

aussenboarder wrote:@Pierre
is there a reason that the same does not apply to the viewer?
In Browser, you work on file, in Viewer on image data
Confirmed - but rotation doesn't work at all also in Browser - even is that option is disabled, using toolbar buttons.
???
Pierre.
aussenboarder
Posts: 17
Joined: Sat Jul 01, 2006 11:34 pm
Location: Berlin

Re: Difference between rotation and lossless rotation?

Post by aussenboarder »

@Pierre
can you please explain what happens when i use the rotate commands in the viewer? the same commands can be found in both interfaces (browser, viewer).
i experience two different behaviours:
case 1: when i use the "normal" rotate commands in the viewer the program asks me whether i want to safe the changes as soon as i change to the browser.
case 2: when i use the "lossless" rotate commands in the viewer the program rotates the image and takes over the changes without asking.
what is the difference between working "on file" and "on image data"?

thank you for you fast reply! regards, aussenboarder
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Difference between rotation and lossless rotation?

Post by xnview »

aussenboarder wrote: what is the difference between working "on file" and "on image data"?
If you work on the file (only jpeg), the file is changed. If you work on image data, the original file is not changed...
Pierre.
aussenboarder
Posts: 17
Joined: Sat Jul 01, 2006 11:34 pm
Location: Berlin

Re: Difference between rotation and lossless rotation?

Post by aussenboarder »

hi Pierre.
i see the difference in handling the image data in the memory instead of directly reading and writing on the file. (pls correct me if i misunderstood)

but i do not understand the following:
i did an experiment rotating an image with the 4 different modes.
the result is that only the "normal" mode of the viewer keeps the original data. the other modes cut off pixels whenever the image dimension aren't a multiple of 8 (?)

Image

why is the above described cut off happening?
what is so special about the 8 pixel multiple?
does it occur for both dimensions?
why are the rotation modes working different?

please do not take this as an offense - i just do not understand and i am curious. rgds, aussenboarder
Dreamer
XnThusiast
Posts: 4608
Joined: Sun Jul 25, 2004 9:08 pm

Re: Difference between rotation and lossless rotation?

Post by Dreamer »

xnview wrote:
Confirmed - but rotation doesn't work at all also in Browser - even is that option is disabled, using toolbar buttons.
???
In Browser, regardless of "use lossless rotation when possible (jpeg)" option, when I click the "Rotate clockwise" toolbar button, nothing happens, image is not rotated, preview just blinks.

In Viewer, if option "use lossless rotation when possible (jpeg)" is enabled, lossless rotation is not used when I use "Rotate clockwise" toolbar button, but image is rotated.
Dreamer
Post Reply