Return-Path: <tiff-admin@remotesensing.org>
Received: from inmx012.isp.belgacom.be (inmx012.isp.belgacom.be [195.238.3.90])
        by mailst006.isp.belgacom.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i4HNNrwt008512
        for <joris.at.lebbeke@skynet.be>; Tue, 18 May 2004 01:23:53 +0200
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.44])
        by inmx012.isp.belgacom.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i4HNNh7E002779
        for <joris.at.lebbeke@skynet.be>; Tue, 18 May 2004 01:23:44 +0200
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com (localhost.localdomain [127.0.0.1])
	by yoda.imagelinks.com (8.11.6/8.11.6) with ESMTP id i4HNMMn18271;
	Mon, 17 May 2004 19:22:22 -0400
Received: from sabre.velocet.net (postfix@sabre.velocet.net [216.138.209.205])
	by yoda.imagelinks.com (8.11.6/8.11.6) with ESMTP id i4HNLCn18203
	for <tiff@remotesensing.org>; Mon, 17 May 2004 19:21:13 -0400
Received: from pobox.com (H156.C195.tor.velocet.net [216.138.195.156])
	by sabre.velocet.net (Postfix) with ESMTP
	id 0056843298; Sat, 15 May 2004 14:52:47 -0400 (EDT)
Message-ID: <40A66700.8090509@pobox.com>
From: Frank Warmerdam <warmerdam@pobox.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Richard Morris <rmorris@mos.us>
Cc: tiff@remotesensing.org
Subject: Re: [Tiff] tiffset usage, ResolutionUnits
References: <40A65AAE.7000700@mos.us>
In-Reply-To: <40A65AAE.7000700@mos.us>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Sender: tiff-admin@remotesensing.org
Errors-To: tiff-admin@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.0.13
Precedence: bulk
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Post: <mailto:tiff@remotesensing.org>
List-Subscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
List-Id: TIFF and libtiff discussion <tiff.remotesensing.org>
List-Unsubscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://remotesensing.org/pipermail/tiff/>
Date: Sat, 15 May 2004 14:52:48 -0400
X-UIDL: 209ca3621203cba1665ef1ca5e27ddb1

Richard Morris wrote:
> Hello all,
> 
> Can anyone point me to any documentation on usage of the "tiffset" 
> utility? I am trying to convert ResolutionUnits on Tiff files from cm to 
> inches, and am not successful so far. I see from the libtiff manual that 
> the tag value for ResolutionUnits is 296, but I don't know how to set 
> the value. From tiffdump output, I saw that tiff files with resolution 
> in cm output "ResolutionUnit (296) SHORT (3) 1<3>", while tiffs with 
> resolution in inches output "ResolutionUnit (296) SHORT (3) 1<2>".
> 
> So, it seemed to me that "tiffset -s 296 2 test.tif" should change the 
> "ResolutionUnit flag to the value required for inches, but I keep 
> receiving the error _TIFFVSetField: test.tif: Bad value -1077938501 for 
> "ResolutionUnit". What are the possible values for ResolutionUnit, and 
> how do I set them? (I am using Tiff library 3.6.1, on FreeBSD)
> 
> Or, if there are any other (shell scriptable) utilities that would do 
> this job, I would appreciate the info.

Richard,

Unfortunately, tiffset only works for string fields, not numeric ones so
I don't think there is a handy way to do what you want.

The following are the documented values for resolution units, if you find
a way to use them:

#define	TIFFTAG_RESOLUTIONUNIT		296	/* units of resolutions */
#define	    RESUNIT_NONE		1	/* no meaningful units */
#define	    RESUNIT_INCH		2	/* english */
#define	    RESUNIT_CENTIMETER		3	/* metric */

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://remotesensing.org/mailman/listinfo/tiff
