JxlDecoderReleaseInput

Function JxlDecoderReleaseInput 

Source
pub unsafe extern "C-unwind" fn JxlDecoderReleaseInput(
    dec: *mut JxlDecoder,
) -> usize
Expand description

Releases input which was provided with JxlDecoderSetInput. Between JxlDecoderProcessInput and JxlDecoderReleaseInput, the user may not alter the data in the buffer. Calling JxlDecoderReleaseInput is required whenever any input is already set and new input needs to be added with JxlDecoderSetInput, but is not required before JxlDecoderDestroy or JxlDecoderReset. Calling JxlDecoderReleaseInput when no input is set is not an error and returns 0.

§Parameters

  • dec: decoder object

§Returns

The amount of bytes the decoder has not yet processed that are still remaining in the data set by JxlDecoderSetInput, or 0 if no input is set or JxlDecoderReleaseInput was already called. For a next call to JxlDecoderProcessInput, the buffer must start with these unprocessed bytes. From this value it is possible to infer the position of certain JPEG XL codestream elements (e.g. end of headers, frame start/end). See the documentation of individual values of JxlDecoderStatus for more information.