Image export problem

What do you want to achieve?

Use exported code form SLS on real HW.

What have you tried so far?

Export project via SLS and re-export image as C file via web image converter

Screenshot or video

This is image in SLS:
image

This is image on real HW:

I converted this image via web image converter and use array for 16bit image (LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0) and it is showing OK at my LCD, but this is not workflow which I would expect. If I upload array for 8bit image from web image converter file, result is similar at the LCD is pretty similar, but not exactly the same.

I tried TFT-eSPi and Adafruit GFX (+ Adafruit Ili9341 driver) library and result is the same in both cases.

Others

  • SquareLine Studio version:
    Tested with 1.0.2 and 1.0.3
  • Operating system:
    Windows 10 x64
  • Target hardware:
    ESP32 with Ili9341 320x240px, Arduino IDE.

I never noticed your post and have posted exactly the same issue !
I don’t understand why this is happening as the SquareLine Studio examples on the website show UI’s constructed entirely of images and yet we can’t seem to get even simple images to display :frowning:

Andy

File->Project Settings->Depth 16 Bits

2 Likes

Thanks @Skorpi , I completely forget about project settings :man_facepalming:

This way the first time when the SLS community helped to answer a question!

So happy to see that! :slightly_smiling_face:
Thanks you very much! I hope we will have an active and helpful community here with a welcoming atmosphere! :rocket: :rocket: :rocket:

1 Like

My too :slight_smile:
Great job - got my images working fine now :tada:

Andy

I have to say this issue is still existed when exporting micropython files. Images are not correctly display even color depth is configured as 16bit for ST7796 SPI driver running on ESP32. When we try to handle it manually by read a png file and set it to image widget source it will be correctly displayed.
SquareLine Studio: v1.2.1 on macOS intel platform
Project settings: 16 bit depth, target is Micropython v1.0.1 and LVGL v8.3.4.

Maybe you need the “16 bit swap” color depth?

Also tried.
After checking the image data generated, I found it always larger than the data directly loaded from the image as an external file.