Most images will not lose quality when rotated 90 or 180 degrees. JPEG is the exception because of the way this format is compressed. Some programs can do lossless JPEG rotation, but it is unclear whether Photoshop is one of them. Initially, I thought that JPEG rotation was lossless when done through Photoshop's File Browser (introduced in Photoshop 6), but after doing some experimenting, I no longer believe that Photoshop can do lossless rotation.
Here is what the JPEG FAQ says about lossless rotation (emphasis is mine):
- "There are a few specialized operations that can be done on a JPEG file without decompressing it, and thus without incurring the generational loss that you'd normally get from loading and re-saving the image in a regular image editor. In particular it is possible to do 90-degree rotations and flips losslessly, if the image dimensions are a multiple of the file's block size (typically 16x16, 16x8, or 8x8 pixels for color JPEGs). This fact used to be just an academic curiosity, but it has assumed practical importance recently because many users of digital cameras would like to be able to rotate their images from landscape to portrait format without incurring loss --- and practically all digicams that produce JPEG files produce images of the right dimensions for these operations to work. So software that can do lossless JPEG transforms has started to pop up. But you do need special software; rotating the image in a regular image editor won't be lossless."
JPEGclub.org provides a list of applications which provide the JPEG lossless rotation feature. Incidentally, Photoshop is not on it.
When you get into rotation at arbitrary angles (anything other than 90 or 180 degrees) using the rotate canvas, rotate layer, or transform commands, this type of rotation uses interpolation and does result in some loss of quality, no matter what the format. For single rotations of small increments, the loss is negligible, but you do not want to do repeated rotations of this type.
More Information:
- JPEG Myths & Facts
- JPEG File Format
- JPEG FAQ
- Lossless Jpeg Rotation - How Not To Ruin Your Digital Camera Files
- Applications with Lossless JPEG Rotation
- Verifying JPEG Lossless Rotation
Thanks to Tristan for his contribution to this article.

