JPEG is a lossy compression scheme, so decompression-manipulation-recompression normally reduces the image quality further for each step. Is it possible to rotate a
Unless you rotate by multiples of 90 degrees then your image will have to perform some kind of interpolation which might reduce the quality of your image. Using a good interpolation algorithm will help here.
As for opening and recompressing, I am not sure you would actually get worse quality, but then I am not sure exactly how JPEG works.
I suggest you try to compress, manipulate and recompress and see for yourself if the result is good enough. What is good enough is subject to your application.
There is a program named jpegtran
jpegtran – a utility for lossless transcoding between different JPEG formats.
To rotate the image losslessly, you can do the following:
$ jpegtran -rotate 180 -perfect -outfile rotated.jpg origin.jpg
And Here is a list of applications which provide the JPEG lossless rotation feature based on the IJG code
If it can help :
Trying to do better than the Microsoft (Windows 7) native picture viewer and its right-click rotation options, I tried several apps of the following link : http://jpegclub.org/losslessapps.html
For instance, I tried FastStone Image Viewer, XnView, Photosurfer, JPEG Lossless Rotator, ExifPro Image Viewer.
NONE of them yields a bigger picture than the basic Windows 7 picture viewer after a simple 90° rotation. It's admittedly limited to conclude so quickly, but I still don't have found a real lossless rotation .jpeg app for the moment, and in any case not better than the built-in Windows one.
Not a jpg expert, but it seems that the answer would be Yes for 90, 180, 270 degree rotations. (maybe even for 360! :))