Hello!
I'm using Ubuntu 22.04.
I'm using a lot of bitmaps, and the easiest way to use bitmaps seems to be to compress
them to ASTC, and store them directly in flash.
As the process of adding a new bitmap is quite time consuming, I have made a php script
that takes one raw image and its associated json. It then creates a pair of .h / .c files
and adds a record in a bitmaplist.h / .cp. files.
Now the next step I would like is a way to directly compress my images on Linux.
It also creats in each .h / .cpp file a structure which contains the file name, data pointer, position
in flash, etc... and also spits out the percentage of flash that has been used. And beside this,
drawing a single image is done with a single command with 2 parameters, one being a rectangle,
and the other is this structure.
Example:
Rect R(x, y, w, h);
BitmapInfo * bmi = BitmapList->FindBMI("MyLogo");
if(bmi) SysLCD->DrawBitmap(R, bmi);
Is there a command-line tool that I can run from the terminal (and therefore from a php script)?
Next question:
How do I choose an encoding method?
I choosed ASTC8x8 at random and it works, but is there logical way to choose an encoding scheme?
Last one:
I have chosen ASTC8x8. When the bitmap dimensions are mutliple of 8, it's just fine. When not,
the size is rounded up to the next multiple of 8. In this case, what will the added image border
look like?
Thanks!
R