egui icon indicating copy to clipboard operation
egui copied to clipboard

Using the user agents capabilities for loading images on web

Open valaphee opened this issue 2 months ago • 0 comments

Is your feature request related to a problem? Please describe. There is no need for a full-on image parsing library on wasm builds, as the user agent integrates plenty of image parser. It's also possible to directly initialize images from such sources. Either through HTMLImageElement or ImageData.

This would improve the loading times, by removing the image parser running in wasm, and the delivery time of the wasm file itself, as the image crate itself is quite heavy.

Describe the solution you'd like

Switching over to using HTMLImageElement.

Describe alternatives you've considered

Additional context Depends on https://github.com/gfx-rs/wgpu/pull/5668

valaphee avatar May 05 '24 23:05 valaphee