Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,17 @@ where
Ok(Some(&self.current_frame))
}

/// Query information about the frame previously advanced with [`Self::next_frame_info`].
///
/// Returns `None` past the end of file.
pub fn current_frame_info(&self) -> Option<&Frame<'static>> {
if self.decoder.at_eof {
None
} else {
Some(&self.current_frame)
}
}

/// Reads the next frame from the image.
///
/// Do not call `Self::next_frame_info` beforehand.
Expand Down
Loading