Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 31901 invoked from network); 1 Oct 2008 12:41:45 -0000
Received: from cliffy.telenet-ops.be ([195.130.136.2])
          (envelope-sender <tiff-bounces@lists.maptools.org>)
          by angelia.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <info@awaresystems.be>; 1 Oct 2008 12:41:45 -0000
Received: from waldo.telenet-ops.be (waldo.telenet-ops.be [195.130.136.10])
	by cliffy.telenet-ops.be (8.13.1/8.13.1) with ESMTP id m91CfjJn031206
	for <info@awaresystems.be>; Wed, 1 Oct 2008 14:41:45 +0200
Received: from pierre.telenet-ops.be (pierre.telenet-ops.be [195.130.132.34])
	by waldo.telenet-ops.be (Postfix) with ESMTP id 023101C004
	for <info@awaresystems.be>; Wed,  1 Oct 2008 14:41:45 +0200 (CEST)
Received: from circe.telenet-ops.be ([195.130.132.51])
	by pierre.telenet-ops.be with bizsmtp
	id MQhk1a00B16hVWj01QhkGs; Wed, 01 Oct 2008 14:41:44 +0200
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by circe.telenet-ops.be (Postfix) with ESMTP id 7EC9133E6A
	for <info@awaresystems.be>; Wed,  1 Oct 2008 14:41:44 +0200 (CEST)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m91Ccgvl029558;
	Wed, 1 Oct 2008 08:40:08 -0400
Received: from grenfell.avtechpulse.com (grenfell.avtechpulse.com
	[64.26.155.62])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m91Ccen3029553
	for <tiff@lists.maptools.org>; Wed, 1 Oct 2008 08:38:40 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by grenfell.avtechpulse.com (Postfix) with ESMTP id A3CC412F802F;
	Wed,  1 Oct 2008 08:38:39 -0400 (EDT)
X-Virus-Scanned: amavisd-new at avtechpulse.com
Received: from grenfell.avtechpulse.com ([127.0.0.1])
	by localhost (server2.domain.avtechpulse.com [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id hTpENgKw9Dzo; Wed,  1 Oct 2008 08:38:36 -0400 (EDT)
Received: from [192.168.0.80] (xena.domain.avtechpulse.com [192.168.0.80])
	by grenfell.avtechpulse.com (Postfix) with ESMTP id 7983912F802D;
	Wed,  1 Oct 2008 08:38:36 -0400 (EDT)
Message-ID: <48E36F4B.8030405@avtechpulse.com>
Date: Wed, 01 Oct 2008 08:38:35 -0400
From: "Dr. Michael J. Chudobiak" <mjc@avtechpulse.com>
Organization: Avtech Electrosystems Ltd.
User-Agent: Thunderbird 2.0.0.16 (X11/20080723)
MIME-Version: 1.0
To: Richard Nolde <nrichard8@qwest.net>
Subject: Re: [Tiff] Image Orientation tag and rotating images
References: <200809281220.m8SCKUdx016387@duke.maptools.org>
	<48E2E87D.3@qwest.net>
In-Reply-To: <48E2E87D.3@qwest.net>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: tiff@lists.maptools.org
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-SpamCatcher-Score: 50 [XX]

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 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
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
