Function openjpeg_sys::opj_read_tile_header
source · pub unsafe extern "C" fn opj_read_tile_header(
p_codec: *mut opj_codec_t,
p_stream: *mut opj_stream_t,
p_tile_index: *mut OPJ_UINT32,
p_data_size: *mut OPJ_UINT32,
p_tile_x0: *mut OPJ_INT32,
p_tile_y0: *mut OPJ_INT32,
p_tile_x1: *mut OPJ_INT32,
p_tile_y1: *mut OPJ_INT32,
p_nb_comps: *mut OPJ_UINT32,
p_should_go_on: *mut OPJ_BOOL,
) -> OPJ_BOOL
Expand description
Reads a tile header. This function is compulsory and allows one to know the size of the tile that will be decoded.
The user may need to refer to the image got by opj_read_header
to understand the size being taken by the tile.
p_codec
— the jpeg2000 codec.p_tile_index
— pointer to a value that will hold the index of the tile being decoded, in case of success.p_data_size
— pointer to a value that will hold the maximum size of the decoded data, in case of success. In case of truncated codestreams, the actual number of bytes decoded may be lower. The computation of the size is the same as depicted inopj_write_tile
.p_tile_x0
— pointer to a value that will hold the x0 pos of the tile (in the image).p_tile_y0
— pointer to a value that will hold the y0 pos of the tile (in the image).p_tile_x1
— pointer to a value that will hold the x1 pos of the tile (in the image).p_tile_y1
— pointer to a value that will hold the y1 pos of the tile (in the image).p_nb_comps
— pointer to a value that will hold the number of components in the tile.p_should_go_on
— pointer to a boolean that will hold the fact that the decoding should go on. In case the codestream is over at the time of the call, the value will be set to false. The user should then stop the decoding.p_stream
— the stream to decode. @return true if the tile header could be decoded. In case the decoding should end, the returned value is still true. returning false may be the result of a shortage of memory or an internal error.