mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -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:  ~Not sure why yet, and I fail to reproduce locally.~ It's because they are on git lfs.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 45 KiB |
@@ -28,8 +28,8 @@ default = ["glow", "persistence"]
|
||||
# image_viewer adds about 0.9 MB of WASM
|
||||
web_app = ["http", "persistence"]
|
||||
|
||||
http = ["ehttp", "image", "poll-promise", "egui_extras/image"]
|
||||
image_viewer = ["image", "egui_extras/all_loaders", "rfd"]
|
||||
http = ["ehttp", "image/jpeg", "poll-promise", "egui_extras/image"]
|
||||
image_viewer = ["image/jpeg", "egui_extras/all_loaders", "rfd"]
|
||||
persistence = [
|
||||
"eframe/persistence",
|
||||
"egui_extras/serde",
|
||||
@@ -56,6 +56,10 @@ eframe = { workspace = true, default-features = false, features = [
|
||||
egui = { workspace = true, features = ["callstack", "default", "log"] }
|
||||
egui_demo_lib = { workspace = true, features = ["default", "chrono"] }
|
||||
egui_extras = { workspace = true, features = ["default", "image"] }
|
||||
image = { workspace = true, default-features = false, features = [
|
||||
# Ensure we can display the test images
|
||||
"png",
|
||||
] }
|
||||
log.workspace = true
|
||||
profiling.workspace = true
|
||||
|
||||
@@ -70,7 +74,6 @@ wgpu = { workspace = true, features = ["webgpu", "webgl"], optional = true }
|
||||
|
||||
# feature "http":
|
||||
ehttp = { version = "0.5", optional = true }
|
||||
image = { workspace = true, optional = true, features = ["jpeg", "png"] }
|
||||
poll-promise = { version = "0.3", optional = true, default-features = false }
|
||||
|
||||
# feature "persistence":
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user