Skip to content

Commit

Permalink
Update image.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Dec 6, 2024
1 parent 3ec42ed commit 5f6fe50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/egui/src/widgets/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ pub fn paint_texture_at(
}

/// gif uris contain the uri & the frame that will be displayed
fn encode_gif_uri(uri: &str, frame_index: usize) -> String {
pub fn encode_gif_uri(uri: &str, frame_index: usize) -> String {
format!("{uri}#{frame_index}")
}

Expand All @@ -815,7 +815,7 @@ pub fn decode_gif_uri(uri: &str) -> Result<(&str, usize), String> {
}

/// checks if uri is a gif file
fn is_gif_uri(uri: &str) -> bool {
pub fn is_gif_uri(uri: &str) -> bool {
uri.ends_with(".gif") || uri.contains(".gif#")
}

Expand Down

0 comments on commit 5f6fe50

Please sign in to comment.