I’ve got an image that mostly consists of 0 opacity backgrounds. To safe space I would really prefer to use -A2 compression from the LVGL image converter script. It works on first sight but after switching to another screen and switching back, the image stops showing up. Perhaps lack of memory? Using the memory monitor it seems I have plenty left.
Any ideas on how to fix this? It is a matter of hundreds of KB of flash, so quite important.
This also seems to apply on particularily large images with RLE compression applied, renders the first time but never renders again.
You suspension is correct. According to LVGL Docs, decodes an alpha-only image (A1, A2, A4), it always expands it to A8 format in RAM at decode time. So even though your source image is compact (2 bits per pixel), LVGL allocates a full 8-bit-per-pixel buffer in RAM to render it.
Thanks. It would really be a shame if there is no possible work around for this. Would increasing the LV_MEM_SIZE in the configuration fix it? Again the memory monitor tells me I use about 22KB max where I have 38KB total memory size set.
EDIT: Setting the color format to A8 instead of A2 still gives an output file one third the size of RGB565A8 and does continue rendering. Probably due to the conversion no longer being necessary. Now if only RLE compression also worked…