Received: by whizzer.wpd.sgi.com (/911001.SGI)
	 id AA28098; Mon, 22 Nov 93 16:27:59 GMT
Received: from sgi.sgi.com by whizzer.wpd.sgi.com via SMTP (/911001.SGI)
	for /usr/people/sam/majordomo/wrapper resend -l tiff -h sgi.sgi.com -f tiff-owner -s -m "-oi -odq -om" tiff-list id AA28091; Mon, 22 Nov 93 08:27:56 -0800
Received: from ns.dknet.dk by sgi.sgi.com via SMTP (931110.SGI/910110.SGI)
	for tiff-relay@whizzer.wpd.sgi.com id AA03205; Mon, 22 Nov 93 08:27:49 -0800
Received: by ns.dknet.dk with UUCP id AA05517
  (5.65c8/IDA-1.4.4j for tiff@sgi.com); Mon, 22 Nov 1993 17:28:16 +0100
Received: from rokke.kampsax.dk by hval.kampsax.dk (5.57/DKnet2.0.5)
        id AA12209; Mon, 22 Nov 93 15:27:26 +0100
Received: from localhost by rokke.kampsax.dk (5.65/DKnet2.0.5) with SMTP
        id AA08482; Mon, 22 Nov 1993 15:25:56 +0100
Message-Id: <9311221425.AA08482@rokke.kampsax.dk>
To: #Hannes Waldmann <hwald@hpwad.wad.hp.com>
Cc: tiff@sgi.sgi.com, krs@kampsax.dk
Subject: Re: tiff tools 
In-Reply-To: Your message of "Mon, 22 Nov 93 12:58:16 EST."
             <9311221158.AA20969@hpwad.wad.hp.com> 
Date: Mon, 22 Nov 93 15:25:53 +0100
From: "Karsten Spang" <krs@kampsax.dk>
X-Mts: smtp
X-Charset: ASCII
X-Char-Esc: 29
Sender: tiff-owner@sgi.sgi.com

> Now I wonder how to change the contents of a single tag field of a given file. 
> I assumed I can do it by means of TIFFOpen and TIFFSetField, but the
> man page of TIFFOpen says "If an existing file is opened for writing, all
> previous data is overwritten."
> So does this mean there isn't a way to easily change single fields?
I think you are right. A possible way of doing this, might be to TIFFOpen
for append, the TIFFSetDirectory to the first, do TIFFSetField, and TIFFClose.
HOWEVER, I recall that someone tried this, and it did *not* work. The only
thing that works, is to copy the file, changing the fields along the way.
You may use a modified version of the code in tiffcp.

                                 Karsten
--------------------------------------------------------------------------------
E-mail: krs@kampsax.dk                                      Karsten Spang
Phone:  +45 36 77 22 23                                     Kampsax Data
Fax:    +45 36 77 03 01                                     P.O. Box 1142
                                                            DK-2650 Hvidovre
                                                            Denmark


