2008.09.23 23:34 "[Tiff] TIFF Image Quality Question", by Rick Cone, Secure Payment Systems

2008.10.01 12:38 "Re: [Tiff] Image Orientation tag and rotating images", by Dr. Michael J. Chudobiak

My first question is whether I have made the correct adjustments to the orientation tag for rotations of 90, 180, and 270 degrees clockwise. Photoshop 7 on Winders displays the files as I would expect to see them, which is the same as before I added the code to change the orientation field in the output file. The Gimp 2.4.5 on Win2K and Fedora 8 display them as I would expect as well. The same is true for Qfaxreader. However, DIMIN Viewer n5 and 11 View on Winders and GThumb 2.7.10 on Fedora 8 seem to be adding an additional mirroring operation to the

Some comments:

  1. libtiff support for orientation is a little odd, because libtiff automatically adjusts for orientations 1-4 (which preserve the height and width), but not 5-8 (which swap height and width). Beware! The gdk-pixbuf loader compensates for this, in gtk 2.11.5 and later. Search for "TIFFTAG_ORIENTATION" in http://svn.gnome.org/viewvc/gtk%2B/trunk/gdk-pixbuf/io-tiff.c?revision=21115&view=markup to see what the gdk-pixbuf loader does.
  2. If you have gtk 2.11.5 and gthumb 2.10.8 or later, gthumb should show the oriented tiffs correctly. Older combinations of gtk/gthumb will not be correct.

My second question is whether I should be updating the orientation tag in addition to transforming the data or is that the cause of the problem. Based on earlier posts to this list, it looks like an either/or proposition but not both. I could offer the option to modify the data or the tag or both as my current code does for inverting the

3) If you transform the data to reflect the orientation tag, the orientation tag should be reset to "top left", or be removed entirely.

4) Orientation tag support for tiff is spotty, so the safest route is to transform the data and remove the orientation tag.

- Mike