Function openjpeg_sys::opj_set_decoded_components
source · pub unsafe extern "C" fn opj_set_decoded_components(
p_codec: *mut opj_codec_t,
numcomps: OPJ_UINT32,
comps_indices: *const OPJ_UINT32,
apply_color_transforms: OPJ_BOOL,
) -> OPJ_BOOL
Expand description
Restrict the number of components to decode.
This function should be called after opj_read_header()
.
This function enables to restrict the set of decoded components to the
specified indices.
Note that the current implementation (apply_color_transforms
== OPJ_FALSE
)
is such that neither the multi-component transform at codestream level,
nor JP2 channel transformations will be applied.
Consequently the indices are relative to the codestream.
Note: opj_decode_tile_data()
should not be used together with opj_set_decoded_components()
.
p_codec
— the jpeg2000 codec to read.numcomps
— Size of thecomps_indices
array.comps_indices
— Array of numcomps values representing the indices of the components to decode (relative to the codestream, starting at 0)apply_color_transforms
— Whether multi-component transform at codestream level or JP2 channel transformations should be applied. Currently this parameter should be set toOPJ_FALSE
. Setting it toOPJ_TRUE
will result in an error.
@return OPJ_TRUE
in case of success.