mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 15:13:12 -04:00
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
egui_extras
This is a crate that adds some features on top top of egui. This crate is for experimental features, and features that require big dependencies that do not belong in egui.
Images
One thing egui_extras is commonly used for is to install image loaders for egui:
egui_extras = { version = "*", features = ["all_loaders"] }
image = { version = "0.25", features = ["jpeg", "png"] } # Add the types you want support for
egui_extras::install_image_loaders(egui_ctx);