From 5f6fe506f6204494efedbb8ed2a3069c9d2ed1bc Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sat, 7 Dec 2024 03:38:09 +0900 Subject: [PATCH] Update image.rs --- crates/egui/src/widgets/image.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/egui/src/widgets/image.rs b/crates/egui/src/widgets/image.rs index 4cdfc5bf749..b1c12f39626 100644 --- a/crates/egui/src/widgets/image.rs +++ b/crates/egui/src/widgets/image.rs @@ -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}") } @@ -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#") }