allow building with older libjpeg again
we don't really care what the error number is, so long as its an error of some kind so just sed JERR_BAD_CROP_SPEC to JERR_CONVERSION_NOTIMPL Change-Id: Iae41de7b720ce2e60c7092d15983aa1c4ba14c89
This commit is contained in:
11
configure.ac
11
configure.ac
@@ -7553,17 +7553,6 @@ if test "$with_system_jpeg" = "yes"; then
|
|||||||
[AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
|
[AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
|
||||||
AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
|
AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ],
|
||||||
[AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
|
[AC_MSG_CHECKING(jpeg library not found or fuctional)], [])
|
||||||
AC_MSG_CHECKING([[libjpeg supports JERR_BAD_CROP_SPEC (jpeg-7 API)]])
|
|
||||||
AC_COMPILE_IFELSE([ AC_LANG_SOURCE(
|
|
||||||
[[
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <jerror.h>
|
|
||||||
int main(int c, char**v) { printf("%d\n", JERR_BAD_CROP_SPEC); return 0; }
|
|
||||||
]]) ],
|
|
||||||
[AC_MSG_RESULT(yes)],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
AC_MSG_ERROR(jpeg library version >= 7 or jpeg-turbo version >= 1.1 required)
|
|
||||||
])
|
|
||||||
libo_MINGW_CHECK_DLL([libjpeg])
|
libo_MINGW_CHECK_DLL([libjpeg])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([internal])
|
AC_MSG_RESULT([internal])
|
||||||
|
@@ -1006,7 +1006,7 @@ jtransform_request_workspace (j_decompress_ptr srcinfo,
|
|||||||
info->crop_yoffset = 0; /* default to +0 */
|
info->crop_yoffset = 0; /* default to +0 */
|
||||||
if (info->crop_xoffset >= info->output_width ||
|
if (info->crop_xoffset >= info->output_width ||
|
||||||
info->crop_yoffset >= info->output_height)
|
info->crop_yoffset >= info->output_height)
|
||||||
ERREXIT(srcinfo, JERR_BAD_CROP_SPEC);
|
ERREXIT(srcinfo, JERR_CONVERSION_NOTIMPL);
|
||||||
if (info->crop_width_set == JCROP_UNSET)
|
if (info->crop_width_set == JCROP_UNSET)
|
||||||
info->crop_width = info->output_width - info->crop_xoffset;
|
info->crop_width = info->output_width - info->crop_xoffset;
|
||||||
if (info->crop_height_set == JCROP_UNSET)
|
if (info->crop_height_set == JCROP_UNSET)
|
||||||
@@ -1016,7 +1016,7 @@ jtransform_request_workspace (j_decompress_ptr srcinfo,
|
|||||||
info->crop_height <= 0 || info->crop_height > info->output_height ||
|
info->crop_height <= 0 || info->crop_height > info->output_height ||
|
||||||
info->crop_xoffset > info->output_width - info->crop_width ||
|
info->crop_xoffset > info->output_width - info->crop_width ||
|
||||||
info->crop_yoffset > info->output_height - info->crop_height)
|
info->crop_yoffset > info->output_height - info->crop_height)
|
||||||
ERREXIT(srcinfo, JERR_BAD_CROP_SPEC);
|
ERREXIT(srcinfo, JERR_CONVERSION_NOTIMPL);
|
||||||
/* Convert negative crop offsets into regular offsets */
|
/* Convert negative crop offsets into regular offsets */
|
||||||
if (info->crop_xoffset_set == JCROP_NEG)
|
if (info->crop_xoffset_set == JCROP_NEG)
|
||||||
xoffset = info->output_width - info->crop_width - info->crop_xoffset;
|
xoffset = info->output_width - info->crop_width - info->crop_xoffset;
|
||||||
|
Reference in New Issue
Block a user