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
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
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
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?
Any news on this? Having converted dozens of little pictures using the web based converter I’d really appreciate a batch version. And a single source containing multiple images … Depending on environment, multiple sources can be a no-brainer - OR tedious manual adding of them all
Well, I’m an old guy, but in order to keep my employer paying me for what I do it is good to learn something new every now and then. I’ll have a look (if I only have the time!), thanks!
I now have something of substance. At the moment it can only convert images in true color mode, however, adding the other modes should be straightforward, as the converter core is a copy-paste of the original PHP code by @kisvegabor (obviously tweaked to use JS syntax instead of PHP).
I’m planning to make this fully compatible with all image types first, then I will work on a web interface.
Now all image types work except for the indexed images. I’m having trouble with these as I can’t find a JS library to replace the built-in PHP function which converts this.
I ended up using a derivative of that library. I have 8-bit indexing working - I just need to get the bitwise logic working for 1, 2, and 4-bit. Then I can start working on the web interface.
The groundwork for this is in place now. Bulk conversion doesn’t work exactly as requested (it requires you to put the full name, not a prefix, and downloads multiple files) but it is a feature now.
See my second post for instructions on a more portable installation.