Skip to content

Commit

Permalink
Ensure that image_width and image_height are initialized if libjpeg v…
Browse files Browse the repository at this point in the history
…8 emulation is enabled.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@565 632fc199-4ca6-4c93-a231-07263d6284db
  • Loading branch information
dcommander committed Apr 2, 2011
2 parents 9e50fa7 + c39ec14 commit 59a5834
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
=====
Expand Down
5 changes: 5 additions & 0 deletions jdtrans.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 59a5834

Please sign in to comment.