Function libjxl_sys::JxlDecoderProcessInput[][src]

pub unsafe extern "C" fn JxlDecoderProcessInput(
    dec: *mut JxlDecoder
) -> JxlDecoderStatus

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 JXL_DEC_ERROR), new information, such as JxlDecoderGetBasicInfo, may have become available after this call. When the return value is not JXL_DEC_ERROR or JXL_DEC_SUCCESS, the decoding requires more JxlDecoderProcessInput calls to continue.

@param dec decoder object @return JXL_DEC_SUCCESS when decoding finished and all events handled. @return JXL_DEC_ERROR when decoding failed, e.g. invalid codestream. TODO(lode) document the input data mechanism @return JXL_DEC_NEED_MORE_INPUT more input data is necessary. @return JXL_DEC_BASIC_INFO when basic info such as image dimensions is available and this informative event is subscribed to. @return JXL_DEC_EXTENSIONS when JPEG XL codestream user extensions are available and this informative event is subscribed to. @return JXL_DEC_COLOR_ENCODING when color profile information is available and this informative event is subscribed to. @return JXL_DEC_PREVIEW_IMAGE when preview pixel information is available and output in the preview buffer. @return JXL_DEC_DC_IMAGE when DC pixel information (8x8 downscaled version of the image) is available and output in the DC buffer. @return JXL_DEC_FULL_IMAGE when all pixel information at highest detail is available and has been output in the pixel buffer.