Rotating stuff in the XP built in photo viewer is bad as well because it'll strip the EXIF tags from the file. It's probably doing a lossy transform as well for the rotation.

I use jhead and jpegtran to do all the rotation of my photos. If you've got a camera that fills in the orientation field of the EXIF header then it'll automatically rotate the image for you.