From: gok@aeromap.com (Gennady Khokhorin)
Date: Wed, 3 Sep 2003 11:11:57 -0800
Subject: [Tiff] libtiff+libjpeg compilation error
Message-ID: <226D2307B478954E9FAE88927B70AD4E6EB8F6@admin1.aeromap.com>

Hello, Andrey!
Yes. It was a problem with type mismatch. With a help from Igor Venevtsev (Moscow, Russia) I'm running tiff with jpeg compression. 
Igor pointed out that LibTIFF redefines standard windows 'boolean' (unsigned char) as 'unsigned int'. I just change libtiff definition (tif_jpeg.c, lines 62..65) to one from jconfig.h:

/* Define "boolean" as unsigned char, not int, per Windows custom */
#ifndef __RPCNDR_H__		/* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN		/* prevent jmorecfg.h from redefining it */

I got the same result after changing boolean type definition on libjpeg side. 

Thanks for you support!

Gennady Khokhorin
Software Developer,
AeroMap US, Intl
www.aeromap.com


Message: 2
From: Andrey Kiselev <dron@ak4719.spb.edu>
Date: Tue, 2 Sep 2003 23:45:55 +0400
To: tiff@remotesensing.org
Subject: Re: [Tiff] libtiff+libjpeg compilation error

On Tue, Sep 02, 2003 at 09:35:30AM -0800, Gennady Khokhorin wrote:
> I'm trying to build libtiff.lib supporting jpeg compression (ex.
> quad-jpeg.tif from v3.4pics.tiff samples). All attempts to use libtiff
> with libjpeg failed with following error message (tiffinfo.exe from
> tifflib tools):
> 
> "JPEGLib: JPEG parameter struct mismatch: library thinks size is 432,
> caller expects 464".

Gennady,

I don't know, whether my previous e-mair was reached you, I had strange
error, but your problem is exactly mismatch between binary library and
header files. Look at the jpeg_CreateDecompress() in japimin.c and at
the jpeg_create_decompress() macro in jpeglib.h for details.

				Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517


