I think there is an issue with the image imports (assets) of SquareLine Studio version 1.6.3, because I hadn’t that problem with a previous version of SqaureLine Studio with the same project.
I imported a 32bit + transparency PNG image file and I got this descriptor for it:
The image doesn’t show up at runtime on my ESP32-P4, although it’s shown on Squareline Studio.
The same happen with a second image. All the others are ok.
I compared the .c file of the same image I have created with a previous version of SqaureLine Studio.
The descriptor is surprisingly different:
The source image must have <=256 colors in the target hardware format. You can tell SquareLine to skip this optimization under project-settings, but you likely are missing color format support to render LVGL I8 → display-color on your device. Are you using the P4 PPA or software LVGL rendering?
EDIT: I’m not from SquareLine, just familiar with image conversion
Thanks for the detailed report, and thanks Richard for pointing in the right direction.
Your image data is fine. The “Optimize image formats in C source export” option (Project Settings) picks the smallest lossless format for each image. It’s switched on for older projects when you open them in 1.6.3. Your logo has no more than 256 colors, so it was exported as LV_COLOR_FORMAT_I8, which is why the file got smaller.
LVGL’s software renderer can’t draw I8 images directly. With LV_BIN_DECODER_RAM_LOAD 1, it converts the whole image to ARGB8888 in RAM: about 232 KB for 421×141. If LVGL’s heap is smaller (the default LV_MEM_SIZE is 64 KB), the image isn’t drawn, and the log shows No memory for indexed image. The old RGB565A8 export was drawn straight from flash and needed no RAM.
How to fix it:
Uncheck “Optimize image formats in C source export” and export again. You’ll get the same output as with the previous version.
Or keep I8 and set LV_BIN_DECODER_RAM_LOAD 0, so images are converted line by line while drawing.
Or give LVGL more heap, e.g. LV_USE_STDLIB_MALLOC LV_STDLIB_CLIB with PSRAM enabled for malloc.
If none of these helps, please post your lv_conf.h (or sdkconfig) and the LVGL log.