JxlDecoderFlushImage

Function JxlDecoderFlushImage 

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

Outputs progressive step towards the decoded image so far when only partial input was received. If the flush was successful, the buffer set with JxlDecoderSetImageOutBuffer will contain partial image data.

Can be called when JxlDecoderProcessInput returns JxlDecoderStatus::NeedMoreInput, after the JxlDecoderStatus::Frame event already occurred and before the JxlDecoderStatus::FullImage event occurred for a frame.

§Parameters

  • dec: decoder object

§Returns

  • JxlDecoderStatus::Success if image data was flushed to the output buffer,
  • JxlDecoderStatus::Error when no flush was done, e.g., if not enough image data was available yet even for flush, or no output buffer was set yet. This error is not fatal, it only indicates no flushed image is available right now. Regular decoding can still be performed.