Intermittent lossless jpg rotate warning.

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: helmut, XnTriq, xnview

Post Reply
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Intermittent lossless jpg rotate warning.

Post by marsh »

Lossless JPG rotate warning in browser sometimes isn't shown. It seems unpredictable.
<ctrl + shift + r>

V 1.90 B4
Last edited by marsh on Sat Feb 17, 2007 8:56 pm, edited 1 time in total.
User avatar
foxyshadis
Posts: 395
Joined: Sat Nov 18, 2006 8:57 am

Post by foxyshadis »

Both width & height divisible by 8? No warning. Otherwise? Warning. It only warns if it will result in the loss of information (because it crops it to be mod-8 ).
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Post by marsh »

Showing dialog only on non-divisible images would be a change in behaviour from previous versions (and different from viewer).
The warning can also appear when nothing is lost. A little unexpected.
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: B4: Intermittent lossless jpg rotate warning.

Post by xnview »

marsh wrote:Lossless JPG rotate warning in browser sometimes isn't shown. It seems unpredictable.
<ctrl + shift + r>
Do you have a way to reproduce it easily?
Pierre.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Post by marsh »

Warning dialog seems to use image dimensions as guide, but perhaps not always in an expected manner. I normally leave dialog off, but I always find this function interesting.

Browser <ctrl + shift +r> results (Rotating 1,2,3,4,## times; 0= original dimensions):
(W= warning dialog)

0. 1600 1200
1. 1200 1600
(Warning not shown, as some might expect for those perfectly divisible by 8 ).

0. 1020 681 W
1. 672 1020 W
2. 1008 672
3. 672 1008
(Warning is not shown when dimensions apparently divisible by 8 are reached; oddly, it did not use 1016 pixels).

0. 1016 768 W
1. 768 1016 W
2. 1016 768 W
3. 768 1016 W
20. 1016 768 W
(Warning is always shown with this particular image, even though no real loss ever occurs according to MD5 and status bar).
User avatar
foxyshadis
Posts: 395
Joined: Sat Nov 18, 2006 8:57 am

Post by foxyshadis »

marsh wrote:0. 1020 681 W
1. 672 1020 W
2. 1008 672
3. 672 1008
(Warning is not shown when dimensions apparently divisible by 8 are reached; oddly, it did not use 1016 pixels).
This can happen if you have subsampled chroma planes, because chroma blocks are then 16x8/8x16 or 16x16. I never thought about that before. Regardless, it's in fixed now so maybe it was another bug.
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

foxyshadis wrote:
marsh wrote:0. 1020 681 W
1. 672 1020 W
2. 1008 672
3. 672 1008
(Warning is not shown when dimensions apparently divisible by 8 are reached; oddly, it did not use 1016 pixels).
This can happen if you have subsampled chroma planes, because chroma blocks are then 16x8/8x16 or 16x16. I never thought about that before. Regardless, it's in fixed now so maybe it was another bug.
Sorry not fixed, so it's not really a bug...
And yes blocks can be 8 or 16
Pierre.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

marsh wrote:Showing dialog only on non-divisible images would be a change in behaviour from previous versions (and different from viewer).
The warning can also appear when nothing is lost. A little unexpected.
I'd expect a warning since JPG rotation does modify the JPG file.

Imagine user Picasso has a very valuable and unique image file. During JPG rotation XnView changes the image file without any warning message? Huh! And imaging XnView screws up the JPG rotation and damages the file. Horrible!
This is a imaginary scenario and I don't expect XnView to damage files, but user should be always aware what is going on).
surfacecleanerz
Posts: 79
Joined: Thu Dec 15, 2005 10:59 am
Location: Germany
Contact:

Post by surfacecleanerz »

That's why we had a discussion some times ago about this, too.

I think XNView should copy the file to be modified, modify it and if no error appears, move original to windows recycle bin and move modified one to the folder it belongs into.

Especially for "lossless" crop this would be a vast improvement.

If you think, this would mess up your recycle bin, eventually an option for deleting the originals from recycle bin when closing XNView should be ok, I think.
Stefan
Post Reply