View Single Post
  #32  
Old 12-05-06, 12:42
Tannin's Avatar
Tannin Tannin is offline  
Senior Member
 
Join Date: Dec 2005
Location: Ballarat, Australia
Posts: 288
Default

Quote:
Originally Posted by Don Hoey
I am sure that in my earlier readings in Jpeg v RAW that rotating jpegs in 90 degree increments is lossless but not so for any in between rotation.
As I understand the mathematics of it, Don, rotating any format by any amount other than 90 or 180 degrees cannot be lossless — doesn't matter if we are considering JPG, RAW, TIFF, PNG, PSD, or even BMP. This is because all formats relevant to our discussion store images as a rectangular collection of dots of particular colours.

If you rotate by 90 degrees, all the software has to do is move the dots around to new positions, keeping every dot exactly the same as it was before, just putting it in a new position.

But if you rotate by any other angle, the software has to interpolate - i.e., guess at - the colour to assign to each of the new dots. The "new dot" doesn't line up exactly with any of the "old dots" so the software takes a weighted average of the old dots that surround the position of the new dot. Obviously, the result involves some loss of quality.

There is no difference between doing this with a JPG or TIFF or any other raster graphics format.

Note, however, that the other differences between different file formats still apply: i.e., BMPs remain accurate across generations but huge and clumsy, JPGs drop quality with successive generations (if you are silly enough to use JPG for multiple iterations instead of converting to BMP or TIFF, manipulating, and converting back), and so on.
Reply With Quote