Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

emilk
Copy link
Owner

@emilk emilk commented Dec 16, 2024

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

Not sure why yet, and I fail to reproduce locally.
It's because they are on git lfs.

@emilk emilk added bug Something is broken web Related to running Egui on the web egui labels Dec 16, 2024
@emilk emilk force-pushed the emilk/fix-images-maybe branch from 1d89c8e to bdfed24 Compare December 16, 2024 08:38
Copy link

Preview available at https://egui-pr-preview.github.io/pr/5480-emilkfix-images-maybe
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@lucasmerlin
Copy link
Collaborator

Could it be that things aren't checked out with lfs for the web build? The error suggests that image couldn't detect the format which would make sense if the image has the lfs text contents

@InfoInnovator
Copy link

I really dont want to intervene here, but @lucasmerlin might be right. I cannot even open the image with my standard image viewer. If i copy the image from the eframe/data to egui_demo_lib/data it works.

@lucasmerlin
Copy link
Collaborator

@InfoInnovator if you have this problem locally, make sure you have properly setup git lfs.

@InfoInnovator
Copy link

@InfoInnovator if you have this problem locally, make sure you have properly setup git lfs.

My bad. I didnt expect somebody to use lfs for a small PNG and didnt know of the guide. After pulling the lfs files, the web demo works as intended.

@emilk
Copy link
Owner Author

emilk commented Dec 16, 2024

Ah, then we should mark the .png:s used for the demo as non-lfs, and also see if we can improve the error message (does lfs links start with some magic bytes?)

@lucasmerlin
Copy link
Collaborator

(does lfs links start with some magic bytes?)

I think so:

version https://git-lfs.github.com/spec/v1
oid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393
size 12345

@emilk
Copy link
Owner Author

emilk commented Dec 16, 2024

Improvement!

image

@emilk emilk force-pushed the emilk/fix-images-maybe branch from edf1f11 to 248a30b Compare December 16, 2024 11:42
@emilk
Copy link
Owner Author

emilk commented Dec 16, 2024

Fixed! Just need to update CI not to complain
image

@emilk emilk changed the title Try to fix broken images on egui.rs Fix broken images on egui.rs Dec 16, 2024
@emilk emilk changed the title Fix broken images on egui.rs Fix broken images on egui.rs (move from git lfs to normal git) Dec 16, 2024
@emilk emilk merged commit f0ec2f0 into master Dec 16, 2024
46 checks passed
@emilk emilk deleted the emilk/fix-images-maybe branch December 16, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken egui web Related to running Egui on the web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants