Received: by smtp02.oce.nl (4.1/SMI-4.1)
	id AA00350; Thu, 30 Jul 98 16:41:17 +0200
Received: from sgi.sgi.com (SGI.COM [192.48.153.1])
	by oce.nl (8.9.0/8.9.0) with ESMTP id QAA09921
	for <rvdt@oce.nl>; Thu, 30 Jul 1998 16:17:02 +0200 (MET DST)
Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) 
	by sgi.sgi.com (980309.SGI.8.8.8-aspam-6.2/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id HAA15648; Thu, 30 Jul 1998 07:11:56 -0700 (PDT)
	mail_from (owner-tiff@sgi.engr.sgi.com)
Received: (from majordomo-owner@localhost)
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	id GAA91192
	for tiff-list;
	Thu, 30 Jul 1998 06:23:29 -0700 (PDT)
	mail_from (owner-tiff@sgi.sgi.com)
Received: from sgi.sgi.com (sgi.engr.sgi.com [192.26.80.37])
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	via ESMTP id GAA86390
	for <tiff-relay@cthulhu.engr.sgi.com>;
	Thu, 30 Jul 1998 06:23:27 -0700 (PDT)
	mail_from (owner-tiff@sgi.sgi.com)
Received: from cosmo.hitachisoft-co.com (hitachisoft-co.com [38.228.68.10]) 
	by sgi.sgi.com (980309.SGI.8.8.8-aspam-6.2/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id GAA01655
	for <tiff@sgi.com>; Thu, 30 Jul 1998 06:23:24 -0700 (PDT)
	mail_from (gvandegrift@hitachisoft-co.com)
Received: by hitachisoft-co.com with Internet Mail Service (5.5.1960.3)
	id <PRT3FJQ0>; Thu, 30 Jul 1998 07:24:58 -0600
Message-Id: <F1154519F71BD2118693004005577BC58836@hitachisoft-co.com>
From: Geoff Vandegrift <gvandegrift@hitachisoft-co.com>
To: bruno Ledoux <bruno_ledoux@binuscan.com>
Cc: tiff@sgi.com
Subject: RE: Appending images
Date: Thu, 30 Jul 1998 07:24:54 -0600
Mime-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
Sender: owner-tiff@fddi-sgi.sgi.com
Precedence: bulk

Bruno,

Upon a quick perusal of the libtiff code, there appears to be a
problem/bug in tif_win32.c.  On or around line 173, you have

	case O_RDWR|O_CREAT:
		dwMode = CREATE_NEW;
		break;

This appears to be an incorrect "translation" of the standard file
constants (O_XXXXX).  In checking through the on-line help, it looks
like it would be more appropriate to replace the above code snippet with

	case O_RDWR|O_CREAT:
		dwMode = OPEN_ALWAYS;
		break;

I haven't tried this change myself (I've never tried to append to a
file), so you might double check that OPEN_ALWAYS is the right
parameter.

Geoff Vandegrift
Applications Engineer
Hitachi Software Engineering America, Ltd.

> -----Original Message-----
> From:	bruno Ledoux [SMTP:bruno_ledoux@binuscan.com]
> Sent:	Wednesday, July 29, 1998 10:00 AM
> To:	tiff@sgi.com
> Subject:	Appending images
> 
> Hi,
> 
> I would like to append images to an existing TIFF file , I tried to
> open
> the file in append mode with :
>         tif = TIFFOpen("myfile.tif","a");
> but it fails because the Windows CreateFile function returns an error
> as
> the file already exists !!!
> 
> Has anyone got any idea ?
> 
> PS: I'm using tifflib v3.4 beta under Windows95.
> 
> Gratefully,
> 
> Bruno
