Skip to content
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

Remove image dependency from eframe (currently necessary for IconData) #5602

Open
valadaptive opened this issue Jan 12, 2025 · 0 comments
Open

Comments

@valadaptive
Copy link
Contributor

Currently, eframe has a mandatory dependency on the image crate. This is because of the eframe::icon_data::from_png_bytes API.

This could probably be replaced with the ImageLoader API and ImageSource, but there are a couple wrinkles in the API:

  • It conflates image loading with image decoding; as far as I can tell, images are just blank until they're done asynchronously loading. This may not be what we want; we should probably set the window icon before starting the rest of the application.
  • All other egui image APIs (e.g. ColorImage) return premultiplied images, whereas IconData stores non-premultiplied images. I'm not actually sure if that's correct for all platforms, but that's the current state of things. Also, From<IconData> for ColorImage treats it like it is premultiplied, so that code in general should probably be cleaned up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant