A little extension to image converter

Hi, it’s me again stealing your precious time.

The Image Converter. How about:
a) develop a nice, portable CMD line app to do it (Python? C?) I had a look at lv_utils repo, the current alternative is somewhat … Well.
b) the web version would be nice should it work in batch mode, ie.

  • accept multiple source image files
  • provide a name prefix field to name the c-source consts (for example - image name is “button_back.png”, prefix is “bm_” --> image descriptor would look like const lv_img_dsc_t bm_button_back = { …etc)
  • multiple images would be put to a single source file (“img_data.c” or similar) to be downloaded

Sorry for trouble,
-petri h

1 Like

I’m planning to rewrite the image converter in Node.js. (In fact, I’ve started, but there’s nothing of substance to show yet.)

I’ll do my best to implement the points you mentioned!


Oh, good to hear!

Then, is there something in Node.js that makes easier to do this kind of utility? I mean … if it was in C(++) or even Python, one could make an offline converter quite easily.

OK, I know nothing about Node.js and thus I’m somewhat afraid to bring all the necessary bricks to my linux installation. Maybe it all is because of my ignorance. Let’s see :relaxed:

It’s very easy to make it work on both the command line and the web when Node.js is used. This is what we did for the font converter.

1 Like

Hmm. Guess I have to pay a little attention to the “dark side” too. See, I have started with Z80 assembly some 10000 years ago, and consider C as an intelligent macro assembler :smile:

But I’m not beyond hope (I hope) - I’ve given a change to Python some time ago, and fell in love for instance in the unbearable easiness of it’s string manipulation. Maybe Node.js will blow my mind (the little that is left) for good?

Thanks and have a nice weekend!