Return-Path: <owner-tiff@olympiakos.com>
Received: from localhost (ak4719.spb.edu [127.0.0.1])
	by ak4719.spb.edu (8.12.1/8.12.1/Debian -5) with ESMTP id h1IHFKLI004353
	for <dron@localhost>; Tue, 18 Feb 2003 20:15:55 +0300
Received: from pop.in02.prd.whowhere.com [209.202.220.196]
	by localhost with POP3 (fetchmail-6.2.0)
	for dron@localhost (single-drop); Tue, 18 Feb 2003 20:15:55 +0300 (MSK)
Received: from gate7.olympiakos.com ([64.32.199.150]) by whowhere.com; Mon, 17 Feb 2003 13:44:30 -0000
X-Envelope-Sender: owner-tiff@olympiakos.com
Received: by gate7.olympiakos.com (Postfix, from userid 65534)
	id 233B01109A; Mon, 17 Feb 2003 08:44:22 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
	by gate7.olympiakos.com (Postfix) with SMTP
	id 1336C1108C; Mon, 17 Feb 2003 08:44:22 -0500 (EST)
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Mon, 17 Feb 2003 08:44:01 -0500
Delivered-To: tiff-outgoing@gate7.olympiakos.com
Received: by gate7.olympiakos.com (Postfix, from userid 16)
	id 72CB511093; Mon, 17 Feb 2003 08:44:01 -0500 (EST)
Delivered-To: tiff@olympiakos.com
Received: from mailout10.sul.t-online.com (mailout10.sul.t-online.com [194.25.134.21])
	by gate7.olympiakos.com (Postfix) with ESMTP id 7E0341108C
	for <tiff@olympiakos.com>; Mon, 17 Feb 2003 08:44:00 -0500 (EST)
Received: from fwd06.sul.t-online.de 
	by mailout10.sul.t-online.com with smtp 
	id 18kl4q-00086G-0A; Mon, 17 Feb 2003 14:12:56 +0100
Received: from localhost.localdomain (510084774297-0001@[217.227.140.119]) by fmrl06.sul.t-online.com
	with esmtp id 18kl4b-0wiUU4C; Mon, 17 Feb 2003 14:12:41 +0100
Subject: flushing of tiffs where only the directory has changed
From: Axel Waggershauser <awagger@web.de>
To: tiff@olympiakos.com
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.5 
Date: 17 Feb 2003 14:12:44 +0100
Message-Id: <1045487564.1089.28.camel@strand>
Mime-Version: 1.0
X-Sender: 510084774297-0001@t-dialin.net
Sender: owner-tiff@olympiakos.com
Precedence: bulk
Status: RO
X-Status: A
Content-Length: 1161
Lines: 32

Hi,

I have to open an tiff file, change a custom field but no image data and
save the changes. This seems no to be possible, since the TIFFFlush()
function writes the directory only if the image data has been changed
(TIFF_BEENWRITING is set). I find the following comment in tif_flush.c:

 * Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING
 * is not set, so that TIFFFlush() will proceed to write out the
directory.
 * The documentation says returning 1 is an error indicator, but not
having
 * been writing isn't exactly a an error.  Hopefully this doesn't cause
 * problems for other people. 


but the subsequent lines look like:

	if ((tif->tif_flags & TIFF_BEENWRITING) == 0)
		return (0);

which looks like an inconsitancy to me. A "return 1;" as stated in the
comment would solve my problem, I think. Does the fact, that 0 is
returned, mean that the mentioned change has been a problem for someone?

Does anybody have an other idea how to solve this problem?

Thanks, Axel.


To subscribe or unsubscribe email tiff-request@olympiakos.com with subscribe
or unsubscribe in the email body.  Libtiff home page: http://www.libtiff.org

