egui/crates
Nicolas Gomez 1545dec7a8
[egui_extra] Allow loading multi-mime formats using the image_loader (#5769)
Hi ! 

I'm using egui and egui_extra to build a demo tool for a crate I'm
building. In this crate I load favicons from a lot of websites, and I
have some failures on some .ico files. After tracking this thing down, I
guess there is two issues (kinda), in the image crate,
'image/vnd.microsoft.icon' isn't recognized as the valid mime for an ico
image (I created a [PR](https://github.com/image-rs/image/pull/2434)),
and the code to detect if a given mime type is compatible with the image
crate decoders in this crate do not support multi-mime type formats.


[ImageFormat::to_mime_type](85f2412d55/src/image.rs (L216C12-L216C24))
is only returning one mime for a given format (which is fine), we
compare the result of this method to guess if the format is
valid/enabled. Retriveing the correct format using
[ImageFormat::from_mime_type](85f2412d55/src/image.rs (L166))
would allow more mime to be considered valid since multiple mime can
match the same format.

The same applies to the extension detection, which I also modified to
stay consistent

Thanks
2025-03-20 11:02:24 +01:00
..
ecolor Add color picker menu item example (#5755) 2025-03-19 09:33:17 +01:00
eframe Bump accesskit to 0.18 and make it a workspace dependency (#5783) 2025-03-20 11:00:12 +01:00
egui Bump accesskit to 0.18 and make it a workspace dependency (#5783) 2025-03-20 11:00:12 +01:00
egui-wgpu Release 0.31.1 - text_edit and kittest fixes 2025-03-05 08:37:34 +01:00
egui-winit Bump accesskit to 0.18 and make it a workspace dependency (#5783) 2025-03-20 11:00:12 +01:00
egui_demo_app Bump accesskit to 0.18 and make it a workspace dependency (#5783) 2025-03-20 11:00:12 +01:00
egui_demo_lib Add `OutputCommand::SetPointerPosition` to set mouse position (#5776) 2025-03-20 10:51:02 +01:00
egui_extras [egui_extra] Allow loading multi-mime formats using the image_loader (#5769) 2025-03-20 11:02:24 +01:00
egui_glow Release 0.31.1 - text_edit and kittest fixes 2025-03-05 08:37:34 +01:00
egui_kittest Fix disabled `DragValue` eating focus, causing focus to reset (#5826) 2025-03-20 10:45:16 +01:00
egui_plot Move `egui_plot` to its own repo (#4828) 2024-07-15 18:45:19 +02:00
egui_web Fix typos (#2866) 2023-04-18 15:52:45 +02:00
emath Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
epaint Simplify the text cursor API (#5785) 2025-03-20 10:49:38 +01:00
epaint_default_fonts Release 0.31.1 - text_edit and kittest fixes 2025-03-05 08:37:34 +01:00