AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1998.04.21 14:00 "libtiff issues", by Tim Shaporev
1998.04.21 14:52 "RE: libtiff issues", by Gerben Vos
1998.04.21 15:44 "Re: libtiff issues", by Tom Lane
1998.04.21 17:42 "Re: libtiff issues", by Sam Leffler
1998.04.24 11:01 "Re: libtiff issues", by Tim Shaporev

1998.04.24 11:01 "Re: libtiff issues", by Tim Shaporev

  • library fails to read a sample packed with method 32771 Is it bug in the library or my fault?

The codec works on all test images I've seen (obviously).

None of images in v3.4pisc.tar.gz use this compression method. That's why I asked - if anybody read any sample compressed by method 32771 (printed as CCITT RLE/W by the library)?

If you've got a problem you can either provide a sample image where there is a problem and wait for someone to look into why the image cannot be decoded or you can dive into the code yourself. I'd suspect the image given the age and heavy testing the existing codecs have had.

I can easily modify the library to read my sample, but I'm not sure if it break something other. On the other hand one my sample is not full substitute for specification.

By the way, could anybody give me a pointer to TIFF _4_ specs?

  • library with ZIP support under MS Visual C/C++ 4.x (besides the fix I have some suggestion to improve the file)

Post diffs or send them to me. I'm far too busy to do anything right now but collect stuff but I _do_ look at everything I receive before I make new distributions (or at least I try to).

Straightforward fix is simple enough:

 *** tiffcomp.h Tue Sep  2 21:54:20 1997
 --- /usr/iutl/ihub/libes/tiff/tiffcomp.h       Wed Apr 15 16:43:39 1998
 ***************
 *** 83,89 ****
   #include <stdlib.h>
   #define      BSDTYPES
   #define      HAVE_UNISTD_H   0
 ! #elif defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows)
   #define      BSDTYPES
   #elif defined(OS2_16) || defined(OS2_32)
   #define      BSDTYPES
 --- 83,89 ----
   #include <stdlib.h>
   #define      BSDTYPES
   #define      HAVE_UNISTD_H   0
 ! #elif defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows) || defined(_WIN32)
   #define      BSDTYPES
   #elif defined(OS2_16) || defined(OS2_32)
   #define      BSDTYPES

This solves problem for Windows but I'm afraid it's not enough since

#define HAVE_UNISTD_H 0

might conflict with "#ifdef HAVE_UNISTD_H" in zconf.h from zlib and looks like the following fix will work better (I did not test it yet)

 *** tiffcomp.h Tue Sep  2 21:54:20 1997
 --- tiffcomp.new       Fri Apr 24 14:37:13 1998
 ***************
 *** 82,89 ****
   #if defined(__MWERKS__) || defined(THINK_C) || defined(__PPCC__) || defined(__SC__) || defined(__MRC__)
   #include <stdlib.h>
   #define      BSDTYPES
 ! #define      HAVE_UNISTD_H   0
 ! #elif defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows)
   #define      BSDTYPES
   #elif defined(OS2_16) || defined(OS2_32)
   #define      BSDTYPES
 --- 82,88 ----
   #if defined(__MWERKS__) || defined(THINK_C) || defined(__PPCC__) || defined(__SC__) || defined(__MRC__)
   #include <stdlib.h>
   #define      BSDTYPES
 ! #elif defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows) || defined(_WIN32)
   #define      BSDTYPES
   #elif defined(OS2_16) || defined(OS2_32)
   #define      BSDTYPES
 ***************
 *** 90,99 ****
   #elif defined(__acornriscos)
   #include <stdlib.h>
   #define      BSDTYPES
 ! #define      HAVE_UNISTD_H   0
 ! #elif defined(VMS)
 ! #define      HAVE_UNISTD_H   0
 ! #else
   #define      HAVE_UNISTD_H   1
   #endif
   
 --- 89,95 ----
   #elif defined(__acornriscos)
   #include <stdlib.h>
   #define      BSDTYPES
 ! #elif !defined(VMS)
   #define      HAVE_UNISTD_H   1
   #endif
   
 ***************
 *** 103,110 ****
    * (except on system where they are in stdio.h and
    * there is no unistd.h).
    */
 ! #if !defined(SEEK_SET) && HAVE_UNISTD_H
 ! #include <unistd.h>
   #endif
   
   /*
 --- 99,112 ----
    * (except on system where they are in stdio.h and
    * there is no unistd.h).
    */
 ! #ifndef SEEK_SET
 ! # ifdef HAVE_UNISTD_H
 ! #  include <unistd.h>
 ! # else
 ! #  define SEEK_SET 0
 ! #  define SEEK_CUR 1
 ! #  define SEEK_END 2
 ! # endif
   #endif

  • config script fails to find proper inline definition under DEC UNIX 4.0

Please send/post a fix.

Unfortunately I'm not familiar enough with this tool to make a fix, I can just point out that configure script from IJG JPEG library is able to find proper definition.

Regards,

                                Tim