Add support for partial bitstream decoding (#1407) (fixes #715)
[openjpeg.git] / src / lib / openjp2 / jp2.h
index 9e7fa56674cd45d8133518b2b6ebffb0e0a7b348..173f25119baf7ff508e3cb79e0095a3e9b2d7a29 100644 (file)
@@ -235,6 +235,15 @@ Decoding parameters are returned in jp2->j2k->cp.
 */
 void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters);
 
+/**
+Set the strict mode parameter.  When strict mode is enabled, the entire
+bitstream must be decoded or an error is returned.  When it is disabled,
+the decoder will decode partial bitstreams.
+@param jp2 JP2 decompressor handle
+@param strict OPJ_TRUE for strict mode
+*/
+void opj_jp2_decoder_set_strict_mode(opj_jp2_t *jp2, OPJ_BOOL strict);
+
 /** Allocates worker threads for the compressor/decompressor.
  *
  * @param jp2 JP2 decompressor handle