Open rustbasic opened 3 weeks ago
Preview available at https://egui-pr-preview.github.io/pr/5344-patch145 Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.
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))
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. If you want to make a PR, I will close this PR once you submit it.
Fix: How to check the image extension from Uri.
It addresses most of what was discussed in #5341, but I'm not sure if it addresses everything.