Changed test for OpenJPEG 2.0

This commit is contained in:
Alastair Houghton 2014-05-27 12:52:50 +01:00
parent 1011e51083
commit 72ecb8752e
2 changed files with 4 additions and 2 deletions

View File

@ -517,7 +517,8 @@ j2k_decode_entry(Imaging im, ImagingCodecState state,
opj_stream_set_read_function(stream, j2k_read);
opj_stream_set_skip_function(stream, j2k_skip);
#if OPJ_VERSION_MAJOR == 2 && OPJ_VERSION_MINOR == 0
/* OpenJPEG 2.0 doesn't have OPJ_VERSION_MAJOR */
#ifndef OPJ_VERSION_MAJOR
opj_stream_set_user_data(stream, decoder);
#else
opj_stream_set_user_data(stream, decoder, NULL);

View File

@ -259,7 +259,8 @@ j2k_encode_entry(Imaging im, ImagingCodecState state,
opj_stream_set_skip_function(stream, j2k_skip);
opj_stream_set_seek_function(stream, j2k_seek);
#if OPJ_VERSION_MAJOR == 2 && OPJ_VERSION_MINOR == 0
/* OpenJPEG 2.0 doesn't have OPJ_VERSION_MAJOR */
#ifndef OPJ_VERSION_MAJOR
opj_stream_set_user_data(stream, encoder);
#else
opj_stream_set_user_data(stream, encoder, NULL);