This is the mail archive of the
mailing list for the Cygwin project.
Re: libjpeg - header file is broken ?
- To: Sven Köhler <skoehler at upb dot de>
- Subject: Re: libjpeg - header file is broken ?
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- Date: Wed, 19 Sep 2001 14:42:04 -0400
- CC: cygwin-apps at cygwin dot com
- References: <008001c1409c$5f76edb0$2c00a8c0@APPZLAP>
Sven Köhler wrote:
> libgd didn't compile - the progressive_mode in the
> jpeg_decompress_struct was missing. i downloaded libjpeg and
> installed that one (which was in fact the same version than that
> installed by cygwin-setup)
No, it is not. If you (a) had downloaded the jpeg6b-3-src.tar.gz file
from sourceware, or (b) read /usr/doc/Cygwin/jpeg-6b.README, you would
> now libgd does compile ...
the cygwin version has had the lossless jpeg patch applied. This
changes some internal data structures inside the jpeg library -- which
ARE NOT SUPPOSED TO BE ACCESSED BY CLIENT PROGRAMS.
See this thread:
However, if you *must* access these things, then make these changes in
cinfo->progressive_mode ---> (cinfo->process == JPROC_PROGRESSIVE)
cinfo->min_DCT_scaled_size ---> cinfo->min_codec_data_unit
cinfo->coef ---> cinfo->codec
cinfo->blocks_in_MCU ---> cinfo->data_units_in_MCU
D_MAX_BLOCKS_IN_MCU ---> D_MAX_DATA_UNITS_IN_MCU
C_MAX_BLOCKS_IN_MCU ---> C_MAX_DATA_UNITS_IN_MCU
DCTSIZE ---> cinfo->data_unit
MCU_blocks ---> MCU_data_units
DCT_scaled_size ---> codec_data_unit
(There may be others; check the ljpeg patch for details. This patch is
included in the sourceware distribution of jpeg-6b-3-src.tar.gz, or can
be obtained from ftp.simplesystems.org)
The netpbm package 'solved' this problem by doing the following:
/* With the lossless jpeg patch applied to the Jpeg library
the name of min_DCT_scaled_size changes to min_codec_data_unit,
for some reason. With this macro, we change it back.
#define min_codec_data_unit min_DCT_scaled_size
(Out of the jpeg private definitions modified by the lossless patch,
netpbm only tries to access "min_DCT_scaled_size". Therefore, netpbm
only needs to worry about that one, and not any of the others)