Comments on: ESP32 CYD with LVGL: Display Image on the Screen https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Thu, 24 Apr 2025 08:27:39 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Erwin https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-1030318 Thu, 24 Apr 2025 08:27:39 +0000 https://randomnerdtutorials.com/?p=161686#comment-1030318 Hi Sara,
Thx for the nice walk-through.

My setup is:
cyd with ESP-WROOM-32
Arduino IDE 2.3.5
lvgl 9.2.2
tft_espi 2.5.43
lv_conf.h from randomnerdtutorials
tft user_setup.h from randomnerdtutorials with define TFT_INVERSION_ON

My image is a 320×240 png (RGBA16) which is a diagonal gradient image from 50% gray to black (no transparent background) which I had converted with https://lvgl.io/tools/imageconverter and created the .h as per your walk-through (with w/h 320/240).

The code compiled but the screen shows 40 blocks (artifacts) colored from grey to black.

Do you have any ideas?

Thanks,
Erwin

]]>
By: Gerald https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-1018182 Thu, 20 Mar 2025 09:44:06 +0000 https://randomnerdtutorials.com/?p=161686#comment-1018182 when I converted the Image I wanted, hexadecimals is just a lot and not loaded in arduino even if it is the converted file?

]]>
By: Chris https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-982982 Wed, 13 Nov 2024 17:06:26 +0000 https://randomnerdtutorials.com/?p=161686#comment-982982 Hi Sara

Another great project. I have wanted to display two numbers 00 – 80 in a large font so that they almost fill the vertical height of the screen. I tried to increase font size (200) but I couldn’t get that to work. Is it possible to create 10 images (0-9) and then call each pair of images as needed?

Thanks

]]>
By: Soyer https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-977305 Tue, 29 Oct 2024 21:35:01 +0000 https://randomnerdtutorials.com/?p=161686#comment-977305 Bonjour,
votre travail est tres interessant pour moi , il me permet de realiser beaucoup de projets que je ne pourrait faire tout seul. J’ai realisé avec succes tous les exemples sur le CYD, mais sur celui-ci , j’ai eu comme les autres un probleme sur la ligne 23 :
#include <image.h>, fichier introuvable
j’ai effacé cette ligne: #include <image.h>, et je l’ai ré-écrite au clavier au lieu de faire un copier/coller, et je ne sais pourquoi mais ça a fonctionné.
Merci pour votre travail

]]>
By: Jim Phillips https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-961793 Thu, 26 Sep 2024 21:12:54 +0000 https://randomnerdtutorials.com/?p=161686#comment-961793 I also got the image.h not found error.
To fix: #include “image.h” (instead of #include <image.h>)
to indicate include file in local directory

]]>
By: Angel https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-957628 Sun, 15 Sep 2024 16:04:59 +0000 https://randomnerdtutorials.com/?p=161686#comment-957628 In reply to Bert.

I’m having the same problem, were you able to solve it?

]]>
By: Teun https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-954116 Thu, 05 Sep 2024 14:27:12 +0000 https://randomnerdtutorials.com/?p=161686#comment-954116 Don’t forget to adjust the picture width and height in the Image File – image.h

const lv_image_dsc_t my_image = { ////// SET WIDTH .w AND HEIGHT .h
.header = {
.magic = LV_IMAGE_HEADER_MAGIC,
.cf = LV_COLOR_FORMAT_ARGB8888,
.flags = 0,
.w = 167,
.h = 169,
//.stride = 120,
.reserved_2 = 0
},
.data_size = sizeof(my_image_map),
.data = my_image_map,
.reserved = NULL
};

]]>
By: Will https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-952791 Sat, 31 Aug 2024 07:42:10 +0000 https://randomnerdtutorials.com/?p=161686#comment-952791 Great tutorial, thanks.
Will you be doing a tutorial to explain how to display an image stored on an SD card as a .h image or even better a standard png?

]]>
By: Walter https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-952421 Thu, 29 Aug 2024 11:56:39 +0000 https://randomnerdtutorials.com/?p=161686#comment-952421 In reply to Walter.

Hello
Correction:
LVGL 9.2.0 compiles but the graphics are distorted.
Knowing that I’m only a hobby programmer I carefully read the instructions and
tried it on 2 computers and also with your “Buttons and Slider” file.
Same result.
Version 9.1.0 works fine for me.

BTW , for a hobby programmer your site is great.

Regards

]]>
By: Walter https://randomnerdtutorials.com/esp32-cyd-lvgl-display-image/#comment-951854 Tue, 27 Aug 2024 15:02:39 +0000 https://randomnerdtutorials.com/?p=161686#comment-951854 Hello
I got an update to LVGL 9.2.0
Now uploading goes wrong.

c:\Users\walte\OneDrive\Documenten\Arduino\libraries\lvgl\src\examples\styles\lv_example_style_14.c:1:10: fatal error: ../../src/themes/lv_theme_private.h: No such file or directory
1 | #include “../../src/themes/lv_theme_private.h”
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

LVGL 9.1.0 still works fine.

Regards,
Walter

]]>