w3llschmidt Posted January 25, 2023 Report Share Posted January 25, 2023 Hello! i noticed that gdispImageOpenFile() takes care about the path ... so if i start the binary in a differnt path then the images, they will not display ... gdispImageOpenFile(&myImage, "icons8-voltmeter-100.png"); Is there a possibility to decode the pictures (icons) into the code; like Fonts? Greets Erik! Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted January 26, 2023 Report Share Posted January 26, 2023 Hello & Welcome to the µGFX community! On 25/01/2023 at 18:38, w3llschmidt said: Is there a possibility to decode the pictures (icons) into the code; like Fonts? Can you explain a bit more what exactly you mean? One option is to use ROMFS. It comes with a little utility to convert any file into a C array essentially allowing you to "embed" files into your binary. The GFILE module allows to transparently load an image from any supported filesystem (including ROMFS). This means that you can develop your GUI on a desktop machine using one of the corresponding drivers (SDL2, X, Win32, ...) and load the files directly from the host's filesystem via NATIVEFS and if you build binaries for your embedded target you just switch over to ROMFS. All of this works without modifying a single line of your application code. I hope this helps. Please don't hesitate to ask if you have any further questions. Link to comment Share on other sites More sharing options...
w3llschmidt Posted February 16, 2023 Author Report Share Posted February 16, 2023 Thanks Joel! ROMFS works like a charm! Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted February 17, 2023 Report Share Posted February 17, 2023 Glad to hear that Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now