TIFF and LibTiff Mail List Archive


2002.07.31 22:28 "jpeg in tiff problem", by Roland Rabien
2002.08.01 05:28 "Re: jpeg in tiff problem", by Tom Lane
2002.08.01 16:42 "RE: jpeg in tiff problem", by Roland Rabien

2002.08.01 16:42 "RE: jpeg in tiff problem", by Roland Rabien

"Roland Rabien" <> writes:

> I'm trying to get jpeg compression in tiff working. I've got libtiff =

> 3.5.7 and jpeglib 6b and I'm compiling on Windows. When I try and open a = > tiff (created with Adobe ImageReady), I get an error in the jpeglib, =

> "JPEG parameter struct mismatch: library thinks size is 464, caller = > expects 432" because "structsize !=3D SIZEOF(struct =

jpeg_decompress_struct)" I assume I'm not building something correctly,

I'd bet lunch that the problem is your application has a different idea of sizeof(boolean) than libjpeg has. Check what libjpeg was built with, and check what's getting imported from the Windoze header files you use. The struct-size check was put in specifically to catch this kind of problem (debugging it any other way was really a nightmare...)

Yes, that was the problem, thank you very much. I never would have found it on my own.

I removed the follow from tif_jpeg.c, since rpcndr.h defines boolean as unsigned char and jpeglib defines boolean as int it caused problems.

/* The windows RPCNDR.H file defines boolean. */
#ifdef __RPCNDR_H__