diff --git a/src/ui/defines.rs b/src/ui/defines.rs index 7d2a2c8..6d81e94 100644 --- a/src/ui/defines.rs +++ b/src/ui/defines.rs @@ -44,7 +44,7 @@ pub mod ui_images { } pub fn load_image_from_path(path: &std::path::Path) -> Result { - let image = image::io::Reader::open(path)?.decode()?; + let image = image::io::Reader::open(path)?.with_guessed_format()?.decode()?; let size = [image.width() as _, image.height() as _]; let image_buffer = image.to_rgba8(); let pixels = image_buffer.as_flat_samples();