On Tue, 08 Feb 2005 08:07:45 GMT, "Sam" wrote:
Ahh thank you, this presumably explains why Irfanview offers lossless (presumably 90 degree multiples) rotations? I wonder if the same is true of windowsxp "pic and fax viewer" ?
I tried to find that answer by looking at a file before and after with a hex editor. The "fax viewer" did appear to change _all_ of the data, which makes me think it was not a lossless rotation. I believe lossless rotation is done by rewriting each 8x8 pixel block with identical values but in a different part of the file, and I could not find any non-trivial byte sequences shared by the before and after files. If the rotation was 90 degrees, "horizontal" sequences would now be "vertical". But the three RGB values for a particular pixel should be together somewhere in each file, and I couldn't even find that.
I even tried rotating the file back to the original orientation, which if lossless should have produced the same exact data, right? It didn't.
Was I wasting my time? Is there any way to prove by looking at the data whether a rotation was lossless or not?
I did just find a long list of programs that do lossless rotation: <
http://sylvana.net/jpegcrop/losslessapps.html>
And those are just the ones based on IJG's jpegtran algorithm. MS "Image Preview" is listed, but not "Picture and Fax Viewer", FWIW.
Loren