Problem with Images

What do you want to achieve?

I have a set of 32-bit PNG images that have been added as assets to SLS.
In SLS, these images appear fine.
When running on the hardware with the framebuffer set to 32-bits and LV_COLOR_DEPTH in lv_conf.h set to 32, the images are all corrupt.

I have one PNG used as the splash screen for Raspberry Pi and it appears fine but that same image when converted to a C file by SLS and displayed using LVGL is corrupt.

What have you tried so far?

Setting frame buffer depth to 32 in /boot/config.txt
Set LV_COLOR_DEPTH to 32 in lv_conf.h

Screenshot or video

N/A

Others

SLS version 1.0.3
Raspbian Lite
Raspberry Pi 3

I would appreciate any advise on how I get my images to appear correctly.

Andy

Should add that when my application starts I see the following:

The framebuffer device was opened successfully.
800x480, 16bpp
The framebuffer device was mapped to memory successfully.

So even though LV_COLOR_DEPTH is set to 32 in lv_conf.h, it seems the framebuffer is still set to 16 BPP !

Andy

LVGL doesn’t set the color depth of the framebuffer, just reads its current settings. So if you have a 16 bit framebuffer you should select 16 bit color depth for LVGL and SquareLine too.

Sorted !
Never noticed the color depth setting under Project Settings.
Case closed :slight_smile:

Andy

1 Like