Jump to content

Recommended Posts

Posted

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!

Posted

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.

  • 3 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...