mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -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