aBe

Test lossless rotation (Ubuntu)

Sun Oct 10, 2010

Image

I was just wondering how to do lossless rotation of images in Ubuntu. The default viewer, Eye Of Gnome, is supposed to do that. According to the help file, “1.4 … All modifications made in JPEG images are lossless. That is, saving rotated and flipped JPEG images will not recompress the image”. But this information is not clearly stated in the program menus. I wanted to be sure it is actually lossless before rotating hundreds of images. To find out I did this:

    + Find a JPEG image in the File Browser, duplicate it pressing CTRL+C and CTRL+V. + Click (select) one of the images, press SPACE to launch EOG, rotate the image, then do File > Save. + Now we have to find out if the image was re-compressed or not. I open both images in Gimp. + I rotate one of them to match the rotation of the other. This rotation inside Gimp is lossless, because no compression is taking place. + I place both images as layers of the same document. Now I have two apparently identical images in two layers, one on top, one on bottom. + I set the Mode of the top layer to Difference. The image becomes black. If it was perfect black it would mean the images are identical and transformation was lossless indeed. Let's find out. + I flatten the image. + I change Levels, dragging the white point triangle from right to left, next to the black point. This brings up details in what was previously black. + The result is the image above, which is obviously not pure black. Somehow the transformation was NOT lossless. Does anyone know what went wrong?
Categories: photo Tags: ubuntu software Places: unimportant

left arrow down arrow right arrow