Function libjxl_sys::JxlEncoderProcessOutput[][src]

pub unsafe extern "C" fn JxlEncoderProcessOutput(
    enc: *mut JxlEncoder,
    next_out: *mut *mut u8,
    avail_out: *mut usize
) -> JxlEncoderStatus

Encodes JPEG XL file using the available bytes. @p *avail_out indicates how many output bytes are available, and @p *next_out points to the input bytes. *avail_out will be decremented by the amount of bytes that have been processed by the encoder and *next_out will be incremented by the same amount, so *next_out will now point at the amount of *avail_out unprocessed bytes.

The returned status indicates whether the encoder needs more output bytes. When the return value is not JXL_ENC_ERROR or JXL_ENC_SUCCESS, the encoding requires more JxlEncoderProcessOutput calls to continue.

@param enc encoder object. @param next_out pointer to next bytes to write to. @param avail_out amount of bytes available starting from *next_out. @return JXL_ENC_SUCCESS when encoding finished and all events handled. @return JXL_ENC_ERROR when encoding failed, e.g. invalid input. @return JXL_ENC_NEED_MORE_OUTPUT more output buffer is necessary.