AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2002.03.20 16:37 "Changing Orientation Tag", by Erika Nesse
2002.03.22 05:56 "Re: Changing Orientation Tag", by Jon Saxton
2002.03.22 21:13 "Re: Changing Orientation Tag", by Peter Smith
2002.03.23 05:38 "Re: Changing Orientation Tag", by Tom Lane
2002.03.25 14:05 "Re: Changing Orientation Tag", by Erika Nesse

2002.03.22 05:56 "Re: Changing Orientation Tag", by Jon Saxton

** Reply to message from "Erika Nesse" <enesse@umich.edu> on Wed, 20 Mar 2002 11:37:49 -0500

I was wondering if anyone knows of any software that changes the orientation of tiffs by toggling the orientation tag, instead of actually changing the order of the data?

That's what I do in my cheque-processing software. If a document is imaged upside-down and the operator clicks the "invert" button, I just change the orientation tag and leave the image unchanged. Any viewer worth using should interpret the orientation tag if it is present. If it doesn't, you have a crappy viewer. (Of course I do flip the image on the screen so the user can see it properly - I just don't bother reconstructing the image in the TIFF file.)

The reason I'm asking is that I would like to convert some files which have a non-standard value for their orientation tag (due to the somewhat over-helpful scanner which created them) to the standard value, so that they do not show up in different orientations depending on whether the viewing software implements the orientation tag or not.

Now I am confused. This seems to contradict the question in the first paragraph. It seems like you do want to twiddle the pixels after all. For each image in a TIFF file the steps are:

        decompress
        rotate and/or mirror
        compress

Again, I assert that it is the viewer's responsibility to display the image correctly. This is especially so with modern operating systems supporting virtualised graphics, because to display the image with the proper view is just a matter of setting up the source and destination presentation spaces correctly. The code is trivial; there are no transforms to be done on the pixel arrays at all so failure to support all possible orientations is just a matter of laziness, ignorance or pig-headedness on the part of the programmer.

IMNSHO, the "correct" answer is to get the vendor to fix the bug.

--
Jon Saxton <js@triton.vg> OS/2 software developer
U.S. agent for Triton Technologies International Ltd
http://www.triton.vg/