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

Decodes JPEG XL file using the available bytes. Requires input has been set with @ref JxlDecoderSetInput. After @ref JxlDecoderProcessInput, input can optionally be released with @ref JxlDecoderReleaseInput and then set again to next bytes in the stream. @ref JxlDecoderReleaseInput returns how many bytes are not yet processed, before a next call to @ref 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 @ref JXL_DEC_ERROR), new information, such as @ref JxlDecoderGetBasicInfo, may have become available after this call. When the return value is not @ref JXL_DEC_ERROR or @ref JXL_DEC_SUCCESS, the decoding requires more @ref JxlDecoderProcessInput calls to continue.

@param dec decoder object @return @ref JXL_DEC_SUCCESS when decoding finished and all events handled. If you still have more unprocessed input data anyway, then you can still continue by using @ref JxlDecoderSetInput and calling @ref JxlDecoderProcessInput again, similar to handling @ref JXL_DEC_NEED_MORE_INPUT. @ref JXL_DEC_SUCCESS can occur instead of @ref JXL_DEC_NEED_MORE_INPUT when, 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. @ref JxlDecoderProcessInput cannot return success if all codestream boxes have not been seen yet. @return @ref JXL_DEC_ERROR when decoding failed, e.g. invalid codestream. TODO(lode): document the input data mechanism @return @ref JXL_DEC_NEED_MORE_INPUT when more input data is necessary. @return @ref JXL_DEC_BASIC_INFO when basic info such as image dimensions is available and this informative event is subscribed to. @return @ref JXL_DEC_EXTENSIONS when JPEG XL codestream user extensions are available and this informative event is subscribed to. @return @ref JXL_DEC_COLOR_ENCODING when color profile information is available and this informative event is subscribed to. @return @ref JXL_DEC_PREVIEW_IMAGE when preview pixel information is available and output in the preview buffer. @return @ref JXL_DEC_DC_IMAGE when DC pixel information (8x8 downscaled version of the image) is available and output is in the DC buffer. @return @ref JXL_DEC_FULL_IMAGE when all pixel information at highest detail is available and has been output in the pixel buffer.