[][src]Function openjpeg2_sys::opj_set_decoded_components

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

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().

@param p_codec the jpeg2000 codec to read. @param numcomps Size of the comps_indices array. @param comps_indices Array of numcomps values representing the indices of the components to decode (relative to the codestream, starting at 0) @param apply_color_transforms Whether multi-component transform at codestream level or JP2 channel transformations should be applied. Currently this parameter should be set to OPJ_FALSE. Setting it to OPJ_TRUE will result in an error.

@return OPJ_TRUE in case of success.