-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Load image from absolute path/url #537
Comments
Yes, this is something I'd like to have... I started a fetch-like API for Revery but haven't had time to finish it. It'd be great to get that working, and then hook up our asset resolution to detect URLs and use that automatically.
Good idea as a workaround for now! I had a PR a while back for absolute paths (#242 ) but didn't finish it. I ported it over to #545 now. It's more naive - just uses a We could look at integrating the |
Regarding My "get-something-running" approach was to save the images to a temporary folder, escape the url from any illegal characters and then provide that path to the renderer. Some questions I had:
There are probably other approaches which may be more suited, just leaving this here since I at least did some experimenting! 🙂 |
Maybe let the user decide with |
Trying to display images from URL I found it's currently not supported. I decided to download images to some tmp directory and use an absolute path as an Image src. And that's also not supported right now:
revery/src/Draw/ImageRenderer.re
Line 25 in aa2051c
The best option would be to have:
which would allow loading images from
/assets
, any directory and URL.I'm willing to help with that feature but I don't know what's the best approach to download image and use it as a texture in ImageRenderer.
The text was updated successfully, but these errors were encountered: