Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 30349 invoked from network); 1 Oct 2008 23:21:57 -0000
Received: from chuck.telenet-ops.be ([195.130.136.1])
          (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 23:21:57 -0000
Received: from vijay.telenet-ops.be (vijay.telenet-ops.be [195.130.136.9])
	by chuck.telenet-ops.be (8.13.1/8.13.1) with ESMTP id m91NLvRR011099
	for <info@awaresystems.be>; Thu, 2 Oct 2008 01:21:57 +0200
Received: from napoleon.telenet-ops.be (napoleon.telenet-ops.be [195.130.132.49])
	by vijay.telenet-ops.be (Postfix) with ESMTP id 94CA160003
	for <info@awaresystems.be>; Thu,  2 Oct 2008 01:21:57 +0200 (CEST)
Received: from penia.telenet-ops.be ([195.130.132.39])
	by napoleon.telenet-ops.be with bizsmtp
	id MbMx1a0030r9RTX03bMxSN; Thu, 02 Oct 2008 01:21:57 +0200
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by penia.telenet-ops.be (Postfix) with ESMTP id 1DA0E33E60E
	for <info@awaresystems.be>; Thu,  2 Oct 2008 01:21:56 +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 m91NIaTJ016195;
	Wed, 1 Oct 2008 19:20:22 -0400
Received: from mpls-qmqp-05.inet.qwest.net (mpls-qmqp-05.inet.qwest.net
	[63.231.195.116])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m91NIXej016192
	for <tiff@lists.maptools.org>; Wed, 1 Oct 2008 19:18:33 -0400
Received: from mpls-pop-10.inet.qwest.net (mpls-pop-10.inet.qwest.net
	[63.231.195.10]) by mpls-qmqp-05.inet.qwest.net (Postfix) with QMQP
	id 8909862780C; Wed,  1 Oct 2008 23:18:22 +0000 (UTC)
Received: from 75-171-195-215.hlrn.qwest.net (HELO css2.css.com)
	(75.171.195.215)
	by mpls-pop-10.inet.qwest.net with SMTP; 1 Oct 2008 23:18:22 -0000
Message-ID: <48E4053C.9060304@qwest.net>
Date: Wed, 01 Oct 2008 17:18:20 -0600
From: Richard Nolde <nrichard8@qwest.net>
User-Agent: Thunderbird 2.0.0.14 (X11/20080501)
MIME-Version: 1.0
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Subject: Re: [Tiff] Image Orientation tag and rotating images
References: <200809281220.m8SCKUdx016387@duke.maptools.org>
	<48E2E87D.3@qwest.net>
	<Pine.SOC.4.64.0810011003510.1107@freddy.simplesystems.org>
In-Reply-To: <Pine.SOC.4.64.0810011003510.1107@freddy.simplesystems.org>
Content-Type: text/plain; charset=ISO-8859-1; 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: 10 [X]

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/
>
>
>

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
