Skip to main content

encode_htj2k_with_qfactor

Function encode_htj2k_with_qfactor 

Source
pub fn encode_htj2k_with_qfactor(
    pixels: &[u8],
    width: u32,
    height: u32,
    num_components: u16,
    bit_depth: u8,
    signed: bool,
    qfactor: u8,
    options: &EncodeOptions,
) -> EncodeResult<Vec<u8>>
Expand description

Encode an irreversible HTJ2K codestream using OpenHTJ2K-compatible Qfactor quantization.

Qfactor is an opt-in visual quantization profile for grayscale or three-component RGB input. It changes the expounded QCD/QCC step tuples; it is not a byte-rate target and is not signaled separately in the codestream.

ยงErrors

Returns an error unless qfactor is in 1..=100, irreversible HT block coding is selected, and the input is grayscale or three-component RGB with the multi-component transform enabled.