Converting c image file back to lvlg binary format

I have lots if image resources in .c file format generated from Online image converter - BMP, JPG or PNG to C array or binary | LVGL

I was lazy and did not keep the original image resources for all images.

Now I want to start using filesystem and need them in binary format instead. Anyone have some code that does it in reverse order, i.e. convert .c file back to a binary file format for LVGL?

Just checking before I write this myself, it should not be to hard.

Thanks!

Implemented it myself in Python, was quite simple.

Hi, is there any chance you could share your code? I also have your same problem and it would be really helpful to have this code. Thank you in advance for any response.

Sure, supports only 16 Bit however, but should not be too hard modify for any else.

https://github.com/jakkra/ZSWatch/blob/main/app/scripts/lvgl_c_array_to_bin.py

Thank you very much, I’ll test it out later on