Function openjpeg_sys::opj_write_tile

source ·
pub unsafe extern "C" fn opj_write_tile(
    p_codec: *mut opj_codec_t,
    p_tile_index: OPJ_UINT32,
    p_data: *mut OPJ_BYTE,
    p_data_size: OPJ_UINT32,
    p_stream: *mut opj_stream_t,
) -> OPJ_BOOL
Expand description

Writes a tile with the given data.

  • p_codec — the jpeg2000 codec.
  • p_tile_index — the index of the tile to write. At the moment, the tiles must be written from 0 to n-1 in sequence.
  • p_data — pointer to the data to write. Data is arranged in sequence, data_comp0, then data_comp1, then … NO INTERLEAVING should be set.
  • p_data_size — this value os used to make sure the data being written is correct. The size must be equal to the sum for each component of tile_width * tile_height * component_size. component_size can be 1,2 or 4 bytes, depending on the precision of the given component.
  • p_stream — the stream to write data to.

@return true if the data could be written.