39#include <emscripten.h>
67 catch (
const std::exception& e)
69 const char *p = e.what();
70 if (strncmp(p,
"ojph error", 10) != 0)
82 catch (
const std::exception& e)
84 const char *p = e.what();
85 if (strncmp(p,
"ojph error", 10) != 0)
107 catch (
const std::exception& e)
109 const char *p = e.what();
110 if (strncmp(p,
"ojph error", 10) != 0)
118 int skipped_res_for_read,
119 int skipped_res_for_recon)
122 skipped_res_for_recon);
220 int skipped_res_for_read,
221 int skipped_res_for_recon)
224 skipped_res_for_recon);
The object represent a codestream.
param_siz access_siz()
Returns the underlying SIZ marker segment object.
void restrict_input_resolution(ui32 skipped_res_for_data, ui32 skipped_res_for_recon)
This function restricts resolution decoding for a codestream. It is for a reading (decoding) codestre...
void set_planar(bool planar)
Sets the sequence of pushing or pull rows from the machinery.
void enable_resilience()
This enables codestream resilience; that is, the library tries its best to decode the codestream,...
void read_headers(infile_base *file)
This call reads the headers of a codestream. It is for a reading (or decoding) codestream,...
void create()
This call is for a decoding (or reading) codestream. Call this function after calling restrict_input_...
line_buf * pull(ui32 &comp_num)
This call is to pull one row from the codestream, being decoded. The returned line_buf object holds o...
void open(const ui8 *data, size_t size)
ui32 get_bit_depth(ui32 comp_num) const
ui32 get_recon_height(ui32 comp_num) const
point get_downsampling(ui32 comp_num) const
ui32 get_recon_width(ui32 comp_num) const
bool is_signed(ui32 comp_num) const
ui32 get_num_components() const
EMSCRIPTEN_KEEPALIVE signed int * pull_j2c_line(j2k_struct *j2c)
EMSCRIPTEN_KEEPALIVE j2k_struct * create_j2c_data(void)
EMSCRIPTEN_KEEPALIVE int get_j2c_num_components(j2k_struct *j2c)
EMSCRIPTEN_KEEPALIVE int get_j2c_downsampling_y(j2k_struct *j2c, int comp_num)
EMSCRIPTEN_KEEPALIVE void parse_j2c_data(j2k_struct *j2c)
EMSCRIPTEN_KEEPALIVE void enable_resilience(j2k_struct *j2c)
EMSCRIPTEN_KEEPALIVE void release_j2c_data(j2k_struct *j2c)
EMSCRIPTEN_KEEPALIVE int get_j2c_height(j2k_struct *j2c, int comp_num)
signed int * cpp_pull_j2c_line(j2k_struct *j2c)
EMSCRIPTEN_KEEPALIVE void init_j2c_data(j2k_struct *j2c, const uint8_t *data, size_t size)
void cpp_parse_j2c_data(j2k_struct *j2c)
void cpp_init_j2c_data(j2k_struct *j2c, const uint8_t *data, size_t size)
void cpp_restrict_input_resolution(j2k_struct *j2c, int skipped_res_for_read, int skipped_res_for_recon)
EMSCRIPTEN_KEEPALIVE int get_j2c_is_signed(j2k_struct *j2c, int comp_num)
j2k_struct * cpp_create_j2c_data(void)
EMSCRIPTEN_KEEPALIVE int get_j2c_downsampling_x(j2k_struct *j2c, int comp_num)
EMSCRIPTEN_KEEPALIVE int get_j2c_bit_depth(j2k_struct *j2c, int comp_num)
EMSCRIPTEN_KEEPALIVE int get_j2c_width(j2k_struct *j2c, int comp_num)
EMSCRIPTEN_KEEPALIVE void restrict_input_resolution(j2k_struct *j2c, int skipped_res_for_read, int skipped_res_for_recon)
void cpp_release_j2c_data(j2k_struct *j2c)
ojph::mem_infile mem_file
ojph::codestream codestream