| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2008.10.01 14:25 "Re: Image Orientation tag and rotating images", by Richard NoldeDr. Michael J. Chudobiak wrote: > Richard Nolde wrote: >> 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 working system has versions of gtk+ and gthumb which are earlier than those listed above which explains why I am not seeing the desired results with those applications. > >> 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 > This confirms my suspicions that modifying both the data and the tag is incorrect, or at least will not produce the results I want. It is curious however, that QuickScan Pro, a commerical scanning program, shows the original orientation when both are modified. This suggests that it is rotating the display data to conform to the value in the tag, whereas the other applications are not doing this. Thanks, Richard |
|||||||