Error image pixels

Description

I’m trying to set a image in a TFT ili9341, I did the conversion with the LVGL converter

https://lvgl.io/tools/imageconverter

The original image has a correct view

ApplicationFrameHost_BgYyCFJDZU

But when I convert to a .c file and insert into my program the image is displayed incorrectly, how can I solve it and see the image correctly?

ApplicationFrameHost_WB5CQ9gzhc

This is my image converter setup:

Other times I had no problem with this and the images were displaying correctly.

What MCU/Processor/Board and compiler are you using?

ESP32 with Arduino IDE

What LVGL version are you using?

v7.8

What do you want to achieve?

Display the image correctly

Code to reproduce

LV_IMG_DECLARE(logoL);
  lv_obj_t * img_src = lv_img_create(lv_scr_act(), NULL); 
  lv_img_set_src(img_src, &logoL);  
  lv_obj_set_pos(img_src, 85, 5);   
  lv_obj_set_drag(img_src, false);

I think your PNG file might be in a format that the PHP converter has trouble with. You can give my beta JavaScript replacement a try - it should work with anything the browser can draw.

https://embeddedt.github.io/lv_img_conv/

1 Like

It works perfectly, thanks!