2004.02.09 17:46 "Re: [Tiff] Photoshop 8.0 and libtiff", by Bob Friesenhahn
Is it possible to use 'unsigned int' or 'unsigned long' instead? The 32-bit CPU is not going to be able to address more range than an 'unsigned int' will support. All that a 64-bit signed type buys you is support for negative values. Does use of an unsigned type cause problems for the interface?
I have just come across a problem in libtiff with images created with Photoshop 8.0. It seems as if Adobe broke their 30,000 pixel and 2 GByte limits in version 8.0. Since Photoshop uses one strip for all images, this causes a problem with tsize_t being defined as int32. A quick workaround is to redefine tsize_t in tiffio.h from int32 to int64. This will give you lots of complaints about possible loss of date, but it seems to work.
For Microsoft Visual change typedef in tiffio.h of tsize_t to
typedef __ int64 tsize_t;
For Unix add the header file stdint.h to tiffio.h and change the typedef of tsize_t to
typedef int64_t tsize_t;
I have just done some minimal testing of this new compile of libtiff, so there is no guaranty, but it seems to work. I believe this will work for files up to 4 GB and then some of the variables that are defined as unsigned int32 will break also.
Has anyone else encountered this? Do you have a different workaround?