gco / xee

Automatically exported from code.google.com/p/xee
74 stars 8 forks source link

Lossless jpeg rotation not lossless? #245

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a jpeg in Xee.
2. Rotate it.
3. Save it.

What is the expected output? What do you see instead?
A losslessly rotated image.

What version of the product are you using? On what operating system?
Xee 2.1.1 on Mac OS X 10.6.5.

Please provide any additional information below.
I first got a little suspicious when I noticed the size difference for rotated 
files. Then in Photoshop I calculated the difference between a jpeg rotated 
there (in memory, not saved, so it should really be lossless) and the same 
image rotated and saved by Xee. There was no visible differences but when I 
checked the histogram and enhanced the contrast with Levels clear differences 
showed up.

Original issue reported on code.google.com by tik...@gmail.com on 13 Dec 2010 at 7:41

Attachments:

GoogleCodeExporter commented 9 years ago
This has to do with the loading in the program you used to compare the images, 
and not Xee.

The image, like many camera images, uses 1:2 chroma subsampling rather than the 
usual 2:2, which means it will load differently depending on how it is rotated.

Rotate the image in Xee, save it, open it again, and rotate it back, then 
compare. There will be no difference.

Original comment by paracel...@gmail.com on 13 Dec 2010 at 11:56

GoogleCodeExporter commented 9 years ago
Ahh, great! Glad there is no problem then :-) .

Original comment by tik...@gmail.com on 13 Dec 2010 at 7:15

GoogleCodeExporter commented 9 years ago
Hi- I tried Xee tonight. Original unrotated photo was 6754KB  then rotated it 
and saved it losslessly (command S) . It is 5826KB. Followed the suggestion 
above to check- rotated back to original position. Saved it losslessly and it 
is now 5826 kb (in Xee window).  Am I doing something wrong?   

Original comment by john.gre...@gmail.com on 17 Feb 2014 at 7:00

GoogleCodeExporter commented 9 years ago
It could be the original image used a huge thumbnail. Thumbnails aren't 
transformed losslessly, they are regenerated each time.

Original comment by paracel...@gmail.com on 17 Feb 2014 at 9:06