1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Fix broken images on egui.rs (move from git lfs to normal git) (#5480)

The images in the widget gallery on egui.rs are broken:

![image](https://github.com/user-attachments/assets/305e1041-e3e3-472d-9a52-1b90e8da053d)

~Not sure why yet, and I fail to reproduce locally.~
It's because they are on git lfs.
This commit is contained in:
Emil Ernerfeldt
2024-12-16 14:16:54 +01:00
committed by GitHub
parent 3bdb19e864
commit f0ec2f05c4
6 changed files with 25 additions and 6 deletions

View File

@@ -78,6 +78,12 @@ impl ImageLoader for ImageCrateLoader {
}
}
if bytes.starts_with(b"version https://git-lfs") {
return Err(LoadError::FormatNotSupported {
detected_format: Some("git-lfs".to_owned()),
});
}
// (3)
log::trace!("started loading {uri:?}");
let result = crate::image::load_image_bytes(&bytes).map(Arc::new);