jpoyner said:
Does rotating a JPEG image recompress it and therefore loses quality?
Is it better to save it as a TIFF file first?
JP
Going back to the original question, the answer is actually, No and No.
Rotating the image does not recompress the image though it may cause the image data to be interpolated. This will depend on the degree of image rotation. 90 degree interval rotations are a special case and interpolation is not necessary and is in fact a slower process than the simpler transposition use for 90 degree intervals. Many programs (I suspect all or nearly all) take advantage of this fact and do not interpolate when images are rotated at 90 degree intervals.
Saving the image as a TIFF "first" brings no benefit. Saving it out as a TIFF afterwards might bring a very small benefit since the TIFF format is lossless.
So, if you open a JPEG, rotate it 90 degrees, save it as a TIFF, re-open the TIFF and rotate the image back 90 degrees, you will have an image identical to the original. At least this is the case in Photoshop.
As pointed out in the FAQ posted by Norm Jackson (
http://graphicssoft.about.com/b/a/012182.htm), if the image is the correct pixel dimension and the software is appropriately designed, it is possible to save a 90 degree interval rotated image in JPEG with no loss as well.
If you rotate the image some amount other than a 90 degree interval (an arbitrary angle) such as 12.5 degrees, the image data will be interpolated and the original data will be altered.
Variants of the issue of the significance of JPEG and recompression loss question come up frequently. I finally decided to put together a simple page showing how small this loss really is when using Photoshop's highest quality setting. I hope that some will find it useful.
http://www.jayandwanda.com/Jpegtest/JPEGtest.html