AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1998.07.29 16:00 "Appending images", by Bruno Ledoux
1998.07.30 07:00 "Re: Appending images", by Tim Shaporev
1998.07.30 13:24 "RE: Appending images", by Geoff Vandegrift

1998.07.30 13:24 "RE: Appending images", by Geoff Vandegrift

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.