Skip to main content

JxlEncoderAddChunkedFrame

Function JxlEncoderAddChunkedFrame 

Source
pub unsafe extern "C" fn JxlEncoderAddChunkedFrame(
    frame_settings: *const JxlEncoderFrameSettings,
    is_last_frame: c_int,
    chunked_frame_input: JxlChunkedFrameInputSource,
) -> JxlEncoderStatus
Expand description

@brief Adds a frame to the encoder using a chunked input source.

This function gives a way to encode a frame by providing pixel data in a chunked or streaming manner, which can be especially useful when dealing with large images that may not fit entirely in memory or when trying to optimize memory usage. The input data is provided through callbacks defined in the @ref JxlChunkedFrameInputSource struct. Once the frame data has been completely retrieved, this function will flush the input and close it if it is the last frame.

@param frame_settings set of options and metadata for this frame. Also includes reference to the encoder object. @param is_last_frame indicates if this is the last frame. @param chunked_frame_input struct providing callback methods for retrieving pixel data in chunks.

@return Returns a status indicating the success or failure of adding the frame.