I am working on Elecrow’s excellent LvGL - SquareLine Studio Tutorial and I want to implement the example here. In this example I need to add some png images to assets folder but the source repo has ui_img_X_png.c files only, not .png files.
What have you tried so far?
I tried to add ui_img_X_png.c files but it doesn’t work (as expected). I searched an online or offline converter to convert png.c c-source image files to .png but I couldn’t. Therefore I am asking a solution here.
The png.c files are generated from png files (by SquareLine Studio’s built-in image-converter) and are not in png format. I think there’s no converter that converts this special LVGL-tailored format back to png. (This of course doesn’t keep you from making PNGs from the screenhots shown on the example page.)
So unless you get the original png files for the example (maybe they’re shared somewhere) you’ll need to add your own png files to the assets. (This will convert them to png.c. Or you can go with the more advanced way of using png or LVGL-compatibel binary image files converted from them as file-assets if that’s what you want.)
Great idea, thank you very much. How could I not have thought of this? The images I will get from the screen will be enough for my tutorial experiment !
Furthermore I understand that after I finalize the design I can replace the generated png.c files with the original png.c files for better resolution.