Fix error w/ lossless crop & libjpeg v7 emulation
The JPEG_LIB_VERSION #ifdef in jtransform_adjust_parameters() was
incorrect, which caused a "Bogus virtual array access" error when
attempting to use the lossless crop feature.
Introduced in c04bd3cc97.
This also adds libjpeg v7 API/ABI emulation to the Travis CI tests.
This commit is contained in:
@@ -23,6 +23,13 @@ matrix:
|
|||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: CONFIGURE_FLAGS="--with-12bit"
|
env: CONFIGURE_FLAGS="--with-12bit"
|
||||||
|
- os: linux
|
||||||
|
compiler: gcc
|
||||||
|
env: CONFIGURE_FLAGS="--with-jpeg7"
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- nasm
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: CONFIGURE_FLAGS="--with-jpeg8"
|
env: CONFIGURE_FLAGS="--with-jpeg8"
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ source/destination managers. Due to an oversight, the `jpeg_skip_scanlines()`
|
|||||||
and `jpeg_crop_scanlines()` functions were not being included in jpeg7.dll when
|
and `jpeg_crop_scanlines()` functions were not being included in jpeg7.dll when
|
||||||
libjpeg-turbo was built with `-DWITH_JPEG7=1` and `-DWITH_MEMSRCDST=1`.
|
libjpeg-turbo was built with `-DWITH_JPEG7=1` and `-DWITH_MEMSRCDST=1`.
|
||||||
|
|
||||||
|
6. Fixed "Bogus virtual array access" error that occurred when using the
|
||||||
|
lossless crop feature in jpegtran or the TurboJPEG API, if libjpeg-turbo was
|
||||||
|
built with libjpeg v7 API/ABI emulation. This was apparently a long-standing
|
||||||
|
bug that has existed since the introduction of libjpeg v7/v8 API/ABI emulation
|
||||||
|
in libjpeg-turbo v1.1.
|
||||||
|
|
||||||
|
|
||||||
1.5.1
|
1.5.1
|
||||||
=====
|
=====
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* This file was part of the Independent JPEG Group's software:
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1997-2011, Thomas G. Lane, Guido Vollbeding.
|
* Copyright (C) 1997-2011, Thomas G. Lane, Guido Vollbeding.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 2010, D. R. Commander.
|
* Copyright (C) 2010, 2017, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README.ijg
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
* file.
|
* file.
|
||||||
*
|
*
|
||||||
@@ -1384,7 +1384,7 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo,
|
|||||||
/* Correct the destination's image dimensions as necessary
|
/* Correct the destination's image dimensions as necessary
|
||||||
* for rotate/flip, resize, and crop operations.
|
* for rotate/flip, resize, and crop operations.
|
||||||
*/
|
*/
|
||||||
#if JPEG_LIB_VERSION >= 70
|
#if JPEG_LIB_VERSION >= 80
|
||||||
dstinfo->jpeg_width = info->output_width;
|
dstinfo->jpeg_width = info->output_width;
|
||||||
dstinfo->jpeg_height = info->output_height;
|
dstinfo->jpeg_height = info->output_height;
|
||||||
#endif
|
#endif
|
||||||
@@ -1395,14 +1395,14 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo,
|
|||||||
case JXFORM_TRANSVERSE:
|
case JXFORM_TRANSVERSE:
|
||||||
case JXFORM_ROT_90:
|
case JXFORM_ROT_90:
|
||||||
case JXFORM_ROT_270:
|
case JXFORM_ROT_270:
|
||||||
#if JPEG_LIB_VERSION < 70
|
#if JPEG_LIB_VERSION < 80
|
||||||
dstinfo->image_width = info->output_height;
|
dstinfo->image_width = info->output_height;
|
||||||
dstinfo->image_height = info->output_width;
|
dstinfo->image_height = info->output_width;
|
||||||
#endif
|
#endif
|
||||||
transpose_critical_parameters(dstinfo);
|
transpose_critical_parameters(dstinfo);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
#if JPEG_LIB_VERSION < 70
|
#if JPEG_LIB_VERSION < 80
|
||||||
dstinfo->image_width = info->output_width;
|
dstinfo->image_width = info->output_width;
|
||||||
dstinfo->image_height = info->output_height;
|
dstinfo->image_height = info->output_height;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user