how to convert PNG image to C array #311
-
How can I get PNG image converted into the C array to use with the lovyanGFX library as shown in this example? is there a special converter or any suggestions regarding how to get my image into this format? as I'm not using an SD card, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
You can use $ xxd -i foo.png foo.h The file |
Beta Was this translation helpful? Give feedback.
-
Thanks @tobozo you are right , i have converted to .bmp and it works well with @ciniml mentioned convertion method. Another probblem now is the color performance , it does not seems to show the right image as expected . how can i get the right image color output or what am i missing? |
Beta Was this translation helpful? Give feedback.
-
oh geez :) it's still hard to say without seeing the actual code, but looking at RGB/BGR situation I'd try to use |
Beta Was this translation helpful? Give feedback.
You can use
xxd
command if you are using Linux or WSL on Windows.The file
foo.h
contains C style array which represents the contents offoo.png