AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1998.08.28 13:52 "multipage", by Michael O'Rourke
1998.08.28 14:34 "Re: multipage", by Geoff Vandegrift

1998.08.28 14:34 "Re: multipage", by Geoff Vandegrift

Michael,

Here is a previous message that may solve your problem. In short, it appears that the Windows specific libtiff code for appending to an image has a bug.

By the way, I'm going to be writing some code in Windows to do the very same thing you're doing; so let me know if you have any other troubles (if you can).

Geoff Vandegrift
Applications Engineer
Hitachi Software Engineering America, Ltd.

> -----Original Message-----
> From: Geoff Vandegrift [SMTP:gvandegrift@hitachisoft-co.com]
> Sent: Thursday, July 30, 1998 7:25 AM
> To: bruno Ledoux
> Cc: tiff@sgi.com
> Subject: RE: Appending images
>
> 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