mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 05:04:24 +03:00
Changed test for OpenJPEG 2.0
This commit is contained in:
parent
1011e51083
commit
72ecb8752e
|
@ -517,7 +517,8 @@ j2k_decode_entry(Imaging im, ImagingCodecState state,
|
||||||
opj_stream_set_read_function(stream, j2k_read);
|
opj_stream_set_read_function(stream, j2k_read);
|
||||||
opj_stream_set_skip_function(stream, j2k_skip);
|
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);
|
opj_stream_set_user_data(stream, decoder);
|
||||||
#else
|
#else
|
||||||
opj_stream_set_user_data(stream, decoder, NULL);
|
opj_stream_set_user_data(stream, decoder, NULL);
|
||||||
|
|
|
@ -259,7 +259,8 @@ j2k_encode_entry(Imaging im, ImagingCodecState state,
|
||||||
opj_stream_set_skip_function(stream, j2k_skip);
|
opj_stream_set_skip_function(stream, j2k_skip);
|
||||||
opj_stream_set_seek_function(stream, j2k_seek);
|
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);
|
opj_stream_set_user_data(stream, encoder);
|
||||||
#else
|
#else
|
||||||
opj_stream_set_user_data(stream, encoder, NULL);
|
opj_stream_set_user_data(stream, encoder, NULL);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user