pub unsafe extern "C-unwind" fn JxlDecoderProcessInput(
dec: *mut JxlDecoder,
) -> JxlDecoderStatusExpand description
Decodes JPEG XL file using the available bytes. Requires input has been
set with JxlDecoderSetInput. After JxlDecoderProcessInput, input
can optionally be released with JxlDecoderReleaseInput and then set
again to next bytes in the stream. JxlDecoderReleaseInput returns how
many bytes are not yet processed, before a next call to JxlDecoderProcessInput
all unprocessed bytes must be provided again (the address need not match, but the contents must),
and more bytes may be concatenated after the unprocessed bytes.
The returned status indicates whether the decoder needs more input bytes, or
more output buffer for a certain type of output data. No matter what the
returned status is (other than JxlDecoderStatus::Error), new information,
such as JxlDecoderGetBasicInfo, may have become available after this call.
When the return value is not JxlDecoderStatus::Error or JxlDecoderStatus::Success, the
decoding requires more JxlDecoderProcessInput calls to continue.
§Parameters
dec: decoder object
§Returns
JxlDecoderStatus::Successwhen decoding finished and all events handled. If you still have more unprocessed input data anyway, then you can still continue by usingJxlDecoderSetInputand callingJxlDecoderProcessInputagain, similar to handlingJxlDecoderStatus::NeedMoreInput.JxlDecoderStatus::Successcan occur instead ofJxlDecoderStatus::NeedMoreInputwhen, for example, the input data ended right at the boundary of a box of the container format, all essential codestream boxes were already decoded, but extra metadata boxes are still present in the next data.JxlDecoderProcessInputcannot return success if all codestream boxes have not been seen yet.JxlDecoderStatus::Errorwhen decoding failed, e.g. invalid codestream.JxlDecoderStatus::NeedMoreInputwhen more input data is necessary.JxlDecoderStatus::BasicInfowhen basic info such as image dimensions is available and this informative event is subscribed to.JxlDecoderStatus::ColorEncodingwhen color profile information is available and this informative event is subscribed to.JxlDecoderStatus::PreviewImagewhen preview pixel information is available and output in the preview buffer.JxlDecoderStatus::FullImagewhen all pixel information at highest detail is available and has been output in the pixel buffer.