TIFF and LibTiff Mail List Archive


2003.12.30 17:04 "[Tiff] TIFFOpen Issue", by Bob Barrett
2003.12.30 18:49 "Re: [Tiff] TIFFOpen Issue", by Frank Warmerdam

2003.12.30 17:04 "[Tiff] TIFFOpen Issue", by Bob Barrett

Hello, I'm new to this forum and libtiff in general, so any help would be appreciated.....

We are attempting to upgrade our AIX operating system from AIX 4.3.3 to AIX 5.1. We currently use libtiff 3.5.5. in our programs to manipulate incoming faxes. No program changes have been made. If I run the existing executable / libraries created on 4.3.3 on our new 5.1 environment, everything runs fine.

When I recompile our application programs that use libtiff on 5.1, I am unable to open multi-page TIFFs (get a null handle) every time. I don't know why I am unable to open the TIFF files. I even recompiled libtiff with the same results. Does anyone have an idea why this wouldn't work? Is 3.5.5 incompatible with 5.1? Thanks.

Bob Barrett
Progressive Insurance

Here's a snippet of the tiffsplit code that fails to open the TIFF file:

* TIFFsplit
* Parameters:
*   szTIFFfile  Path and filename of TIFF to split
* Returns:
*    0  Success
*   -1  Unable to open file to split
*   -2  Unable to create/open a file to write single-page TIFF to
*   -3  Split failed for some reason
* Description:
*   Take a multi-page TIFF file and split it into multiple  single-page TIFF
*   files following the filenaming convention of the original filename, then "_PP"
*   where "PP" is the page number, then the original extention.

int TIFFsplit(char szTIFFfile[]) {

    TIFF *in, *out;
    int nPage = 1;
    char szInFile[1024+1];
    char szOutFile[1024+1];
    char szFileNoExt[1024+1];
    int nExtension;

    in = TIFFOpen(szTIFFfile, "r");
    if (out == NULL)
      return (-1);
    // Find the extension (which begins with a period)
    nExtension = strcspn(szTIFFfile, ".");
    if (in != NULL) {
        do {