Decode in-memory PNG/JPEG data to Image
#10803
Unanswered
flozf
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for helping me with all of my questions regarding Slint.
Instead of another question, I'd like to contribute a small code snippet I came up with, which might be useful for others.
There is no function to decode an in-memory image file to an
Imageobject.This is my solution:
You have to add a dependency to
imageto yourCargo.toml, e.g.Because Slint uses this crate too, the binary size should not increase much. (At least as long as you use the same version as your Slint library.)
Beta Was this translation helpful? Give feedback.
All reactions