Time to be with your loved ones

Time to be with loved ones

by sat

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

I usually rotate all my jpg photos (using Windows Photo Viewer) after removing them from my camera's card. Is this correct? Am I losing quality for rotating them? Should I just leave them as they are and later incorporate the rotation as another retouch step - at a post-processing software like, for instance, Lightroom?

Sometimes I see websites like DPreview.com showing their camera's sample photos not rotated, thus I thought rotating them would reduce (a lit bit) their quality. It it a fair assumption?

share|improve this question
    
I'd say windows photo viewer would be the worst thing to do any form of editing in if quality is what you're worried about. I've refused to use it ever since I saw it was editing exif info just viewing my photos, no idea if it still does that –  Dreamager Aug 30 '11 at 10:05
1  
Also, take into account that most digital cameras today add the Orientation EXIF tag to the image metadata. If you just want to rotate an image 90 degrees (from portrait to landscape or viceversa), modifying the EXIF tag is better. BTW, Windows Photo Viewer does not interprete this tag, but other software does. So probably your images are already in the correct orientation, and the problem is the software you are using. –  Carlos Campderrós Aug 30 '11 at 14:38
add comment

2 Answers

up vote 9 down vote accepted

Whether rotation loses quality or not depends on software (and its version) used and image dimensions. Images that have width or height (measured in pixels) not divisible by 8, cannot be rotated in a lossless way.

As for Windows Photo Viewer, Matt Grum has already given a stellar answer to the more specific question. For other software, you could use the sample images in his answer and try the same experiment.

Note that rotation can only be lossless for rotation by a solid angle or 180 degrees. Rotation by arbitrary angle always requires re-compression and also makes the picture softer, even if you use a non-compressed format (such as BMP) - the new pixels do not have exactly corresponding pixels on the non-rotated image and therefore have to be calculated based on weighted average of surrounding pixels.

After rotation by arbitrary angle, you might also lose some edge areas of your composition when you crop the image into a rectangle with horizontal and vertical sides.

share|improve this answer
1  
Both width and height must be divisible by 8 for a lossless rotation? Thx for the link to Matt Grum, awesome answer. –  DiAlex Aug 30 '11 at 10:26
    
yes, they have to. –  JoséNunoFerreira Aug 30 '11 at 13:09
add comment

It all depends on the program you use. There are programs that can do it without losing anything, but most programs just decompress and recompress, thus losing some signal.

Among others, these programs can do it without loss in quality: http://jpegclub.org/losslessapps.html

share|improve this answer
    
The list only shows applications that use lossless algorithms as provided by Independent JPEG group. Applications doing it based on original code or another libraries are not listed, including the Windows Photo Viewer that was referred in question (although Image Preview used in some earlier versions of Windows is listed). –  Imre Aug 30 '11 at 10:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.