AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2008.09.23 23:34 "[Tiff] TIFF Image Quality Question", by Rick Cone, Secure Payment Systems
2008.09.24 00:11 "Re: [Tiff] TIFF Image Quality Question", by Bob Friesenhahn
2008.10.01 23:18 "Re: [Tiff] Image Orientation tag and rotating images", by Richard Nolde
2008.10.01 03:03 "[Tiff] Image Orientation tag and rotating images", by Richard Nolde
2008.10.01 12:38 "Re: [Tiff] Image Orientation tag and rotating images", by Dr. Michael J. Chudobiak
2008.10.01 14:25 "Re: [Tiff] Image Orientation tag and rotating images", by Richard Nolde
2008.10.01 16:32 "Re: [Tiff] Image Orientation tag and rotating images", by Richard Nolde
2008.10.01 18:59 "Re: [Tiff] Image Orientation tag and rotating images", by Dr. Michael J. Chudobiak
2008.10.02 05:43 "Re: [Tiff] Image Orientation tag and rotating images", by Andrey Kiselev
2008.10.01 15:08 "Re: [Tiff] Image Orientation tag and rotating images", by Bob Friesenhahn
2008.10.01 16:02 "Re: [Tiff] Image Orientation tag and rotating images", by Edward Lam
2008.10.02 02:42 "Re: [Tiff] Image Orientation tag and rotating images", by Bob Friesenhahn
2008.09.24 01:14 "Re: [Tiff] TIFF Image Quality Question", by Phillip Crews

2008.10.01 23:18 "Re: [Tiff] Image Orientation tag and rotating images", by Richard Nolde

Bob Friesenhahn wrote:
> On Tue, 30 Sep 2008, Richard Nolde wrote:
>
>> Concerning rotating images in tiffcrop:

>> I've been working on the orientation tag issue for images rotated >> with tiffcrop and I get two distinctly different results with a

>> variety of viewers. Below are the outputs from tiffinfo on the
>> original image and three
>

> It seems like hardly any software supports the orientation tag > correctly. It seems that perhaps Photoshop does things correctly. The Captiva Software Quick Scan product was the only one I found that showed the transformed images in the original orientation when the orientation tag was modified at the same time as the data were transformed. Photoshop 7, the only version I have, and the Gimp showed it in the rotated position as though the orientation tag was TOPLEFT.

I've modified my code to read the orientation tag of the image and perform any transforms needed to present the data in TOPLEFT orientation (which I will call default viewing orientation) before any requested transforms are applied. In all cases, the orientation is set to TOPLEFT after the transforms are applied, whether as a correction to the incoming orientation or by explicit user request. This should provide a valid display for applications that ignore the tag and those that handle it properly since the final orientation is TOPLEFT in every case. This should work for files with or without an orientation tag and it offers the user the chance to force a transform just by specifying the mirroring and/or rotations on the command line. User specified transforms will be applied after any orientation adjustments have been applied so they are relative to the viewing orientation rather than the original orientation.

Since my code works with 1,2,4,8, and 16 bit data, the only cases that I suspect will be an issue are floating point images. If anyone has a small image with floating point data, I would be interested in seeing what adjustments are needed. Which viewers can be used to display TIFFs with floating point data?

Richard
>

> A problem with updating the orientation tag is that often it is wrong.

> Perhaps the user wants to ignore the existing orientation flag, rotate > the image, and then set the orientation flag correctly. Or perhaps

> the user wants to turn the image right side up and remove the > orientation tag.

>

> Ultimately, only the user knows for sure how to treat the orientation > tag since they can see the image

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/