Page 1 of 1

Intermittent lossless jpg rotate warning.

Posted: Tue Dec 12, 2006 1:54 am
by marsh
Lossless JPG rotate warning in browser sometimes isn't shown. It seems unpredictable.
<ctrl + shift + r>

V 1.90 B4

Posted: Tue Dec 12, 2006 2:50 am
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 ).

Posted: Tue Dec 12, 2006 3:00 am
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.

Re: B4: Intermittent lossless jpg rotate warning.

Posted: Tue Dec 12, 2006 8:32 am
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?

Posted: Tue Dec 12, 2006 4:45 pm
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).

Posted: Wed Dec 13, 2006 8:51 am
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.

Posted: Wed Dec 13, 2006 9:31 am
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

Posted: Wed Dec 13, 2006 10:57 pm
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).

Posted: Tue Jan 16, 2007 6:47 pm
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