-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: How to check the image extension from Uri. #5344
base: master
Are you sure you want to change the base?
Conversation
Preview available at https://egui-pr-preview.github.io/pr/5344-patch145 |
Thank you for the PR to resolve an issue I introduced and apologies that my previous changes have caused issues for you, though I have concerns that this PR would still fail in some web URI scenarios. Also, if this were to be the direction we go, you'd almost certainly want to do something like this to avoid having to keep extensions in sync with the image crate manually :) ImageFormat::all()
.filter(ImageFormat::reading_enabled)
.flat_map(ImageFormat::extensions_str)
.any(|format_ext| uri.contains(*format_ext)) |
I have modified this PR as you said. |
Fix: How to check the image extension from Uri.
image
crate URI and MIME support detection #5324It addresses most of what was discussed in #5341, but I'm not sure if it addresses everything.