-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Egui has the ability to load image from a so called texture. Textures in egui give us the ability to draw stuff to the window from an array of pixels instead of image bytes.
Roseate is already decoding images to rgba pixel arrays for downsampling but right now it's encoding it again back to image bytes just to load it into egui. That sounds a massive waste of CPU time as from my understanding egui would have to decode the image again anyways to plot it's pixels into the GUI.
I think completing this issue will significantly boost image load time as right now one of the big blockers in load time is image encoding and decoding and also what I noticed recently, the time it takes passing the image to egui.
Some concerns
But before we go head over heels and implement this we need to take the size of rgba image pixels in memory into consideration and compare it with image bytes to see if we are loosing on the memory side of things.
Then we must also see how this will effect SVG files and most concerning GIFs.