pub unsafe extern "C" fn JxlEncoderAddJPEGFrame(
frame_settings: *const JxlEncoderFrameSettings,
buffer: *const u8,
size: usize,
) -> JxlEncoderStatusExpand description
Sets the buffer to read JPEG encoded bytes from for the next frame to encode.
If @ref JxlEncoderSetBasicInfo has not yet been called, calling @ref JxlEncoderAddJPEGFrame will implicitly call it with the parameters of the added JPEG frame.
If @ref JxlEncoderSetColorEncoding or @ref JxlEncoderSetICCProfile has not yet been called, calling @ref 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.
Note, this can only be used to add JPEG frames for lossless compression. To encode with lossy compression, the JPEG must be decoded manually and a pixel buffer added using JxlEncoderAddImageFrame.
@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