JxlEncoderSetFrameHeader

Function JxlEncoderSetFrameHeader 

Source
pub unsafe extern "C-unwind" fn JxlEncoderSetFrameHeader(
    frame_settings: *mut JxlEncoderFrameSettings,
    frame_header: *const JxlFrameHeader,
) -> JxlEncoderStatus
Expand description

Sets the frame information for this frame to the encoder. This includes animation information such as frame duration to store in the frame header. The frame header fields represent the frame as passed to the encoder, but not necessarily the exact values as they will be encoded file format: the encoder could change crop and blending options of a frame for more efficient encoding or introduce additional internal frames. Animation duration and time code information is not altered since those are immutable metadata of the frame.

It is not required to use this function, however if have_animation is set to true in the basic info, then this function should be used to set the time duration of this individual frame. By default individual frames have a time duration of 0, making them form a composite still. See JxlFrameHeader for more information.

This information is stored in the JxlEncoderFrameSettings and so is used for any frame encoded with these JxlEncoderFrameSettings. It is ok to change between JxlEncoderAddImageFrame calls, each added image frame will have the frame header that was set in the options at the time of calling JxlEncoderAddImageFrame.

The is_last and name_length fields of the JxlFrameHeader are ignored, use JxlEncoderCloseFrames to indicate last frame, and JxlEncoderSetFrameName to indicate the name and its length instead. Calling this function will clear any name that was previously set with JxlEncoderSetFrameName.

§Parameters

  • frame_settings: set of options and metadata for this frame. Also includes reference to the encoder object.
  • frame_header: frame header data to set. Object owned by the caller and does not need to be kept in memory, its information is copied internally.

§Returns