JxlEncoderAddChunkedFrame

Function JxlEncoderAddChunkedFrame 

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

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 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.

§Parameters

  • frame_settings: Set of options and metadata for this frame. Also includes reference to the encoder object.
  • is_last_frame: Indicates if this is the last frame.
  • chunked_frame_input: Struct providing callback methods for retrieving pixel data in chunks.

§Returns

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