diff --git a/ChangeLog.txt b/ChangeLog.txt index 3d609e9d3..6d6bdb5f9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -19,6 +19,11 @@ libjpeg-turbo with older versions of MinGW64, you will now have to add [4] Fixed a regression bug in the NSIS script that caused the Windows installer build to fail when using the Visual Studio IDE. +[5] Fixed a bug in jpeg_read_coefficients() whereby it would not initialize +cinfo->image_width and cinfo->image_height if libjpeg v8 emulation was enabled. +This specifically caused the jpegoptim program to fail if it was linked against +a version of libjpeg-turbo that was built with libjpeg v8 emulation. + 1.1.0 ===== diff --git a/jdtrans.c b/jdtrans.c index 9d9c1b1d5..f0cd0aef9 100644 --- a/jdtrans.c +++ b/jdtrans.c @@ -99,6 +99,11 @@ transdecode_master_selection (j_decompress_ptr cinfo) /* This is effectively a buffered-image operation. */ cinfo->buffered_image = TRUE; +#if JPEG_LIB_VERSION >= 80 + /* Compute output image dimensions and related values. */ + jpeg_core_output_dimensions(cinfo); +#endif + /* Entropy decoding: either Huffman or arithmetic coding. */ if (cinfo->arith_code) { #ifdef D_ARITH_CODING_SUPPORTED