Skip to content

Commit

Permalink
Fix for lower version of OpenJPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertLitjens committed Nov 14, 2018
1 parent 9ce9e0e commit 449d70d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions multiresolutionimageinterface/JPEG2000Codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ void JPEG2000Codec::decode(unsigned char* buf, const unsigned int& inSize, const

//Setup the decoder decoding parameters using user parameters.
opj_setup_decoder(decoder, &decodeParameters);
#if OPJ_VERSION_MAJOR >= 2 && OPJ_VERSION_MINOR >= 3
opj_codec_set_threads(decoder, 4);
#endif

// Read the main header of the codestream, if necessary the JP2 boxes, and create decompImage.
OPJ_BOOL headerSucces = opj_read_header(l_stream, decoder, &decompImage);
Expand Down

0 comments on commit 449d70d

Please sign in to comment.