pub unsafe extern "C" fn JxlEncoderAddJPEGFrame(
    frame_settings: *const JxlEncoderFrameSettings,
    buffer: *const u8,
    size: usize
) -> JxlEncoderStatus
Expand description

Sets the buffer to read JPEG encoded bytes from for the next frame to encode.

If JxlEncoderSetBasicInfo has not yet been called, calling JxlEncoderAddJPEGFrame will implicitly call it with the parameters of the added JPEG frame.

If JxlEncoderSetColorEncoding or JxlEncoderSetICCProfile has not yet been called, calling JxlEncoderAddJPEGFrame will implicitly call it with the parameters of the added JPEG frame.

If the encoder is set to store JPEG reconstruction metadata using @ref JxlEncoderStoreJPEGMetadata and a single JPEG frame is added, it will be possible to losslessly reconstruct the JPEG codestream.

If this is the last frame, @ref JxlEncoderCloseInput or @ref JxlEncoderCloseFrames must be called before the next @ref JxlEncoderProcessOutput call.

@param frame_settings set of options and metadata for this frame. Also includes reference to the encoder object. @param buffer bytes to read JPEG from. Owned by the caller and its contents are copied internally. @param size size of buffer in bytes. @return JXL_ENC_SUCCESS on success, JXL_ENC_ERROR on error