JxlDecoderSkipFrames

Function JxlDecoderSkipFrames 

Source
pub unsafe extern "C-unwind" fn JxlDecoderSkipFrames(
    dec: *mut JxlDecoder,
    amount: usize,
)
Expand description

Makes the decoder skip the next amount frames. It still needs to process the input, but will not output the frame events. It can be more efficient when skipping frames, and even more so when using this after JxlDecoderRewind. If the decoder is already processing a frame (could have emitted JxlDecoderStatus::Frame but not yet JxlDecoderStatus::FullImage), it starts skipping from the next frame. If the amount is larger than the amount of frames remaining in the image, all remaining frames are skipped. Calling this function multiple times adds the amount to skip to the already existing amount.

A frame here is defined as a frame that without skipping emits events such as JxlDecoderStatus::Frame and JxlDecoderStatus::FullImage, frames that are internal to the file format but are not rendered as part of an animation, or are not the final still frame of a still image, are not counted.

ยงParameters

  • dec: decoder object
  • amount: the amount of frames to skip