TIFF and LibTiff Mail List Archive


2003.05.27 15:05 "orientation", by
2003.05.27 22:12 "Re: orientation", by Jon Saxton
2003.05.28 00:01 "Re: orientation", by Peter Montgomery
2003.05.28 12:12 "RE: orientation", by Belshan, James

2003.05.27 22:12 "Re: orientation", by Jon Saxton

** Reply to message from on Tue, 27 May 2003 17:05:46 +0200

As I understand it, orientation is a display hint, albeit an important one.

In most windowing display systems it is only necessary to set up the destination rectangle correctly before transferring the pixels into the presentation space. Orientation 4 means left-to-right, bottom-to-top which may or may not match your operating system's native display format. Most systems nowadays work in 4th quadrant coordinate space so it probably won't match.

You can either define your source and destination rectangles as

  __________b    c__________
 |          |    |          |
 |  Source  |    |   Dest   |
 |__________|    |__________|
a                            d

(where a. b, c and d are the defining corners), or as the logical complement
thereof, namely

a __________      __________d 
 |          |    |          |
 |  Source  |    |   Dest   |
 |__________|    |__________|

             b c

and the pixel transfer function will take care of the orientation on your behalf. This is a useful technique which is often overlooked.

I have a question about orientation tag of a tiff image.

To display correctly an image whith orientation tag equal 4 (instead of 1 by default), should I need to revert the buffer before displaying it? If no, what is the use of orientation tag?

diana szleper

Jon Saxton <>
Developer of cross-platform software for UNIX, OS/2 and Win32
U.S. agent for Triton Technologies International Ltd