-
Hello, i've been trying to display a jpg image using esp8266 ,tft_eSPI but i cant make it work. The image is a jpg converted to .h, i am not sure how to use the parameters image, image #defines , image extern, image memory and image format correctly to make this work, could someone help me? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
@RayOS9 Sorry, but Calvin @ImpulseAdventure hasn't implemented displaying jpg's using *.h files. Only BMP's from *.c files. You can place jpg in your SPIFFS ESP8266 filesystem and display them that way. Arduino's IDE can support loading files into SPIFFS from a sub-folder inside your project folder named "data". If you go this way my GUIsliceBuilder can import the JPG into your project file and deal with setting image #defines, externs etc for you. If you have any problem using the Builder you can post in You can also post in GUIslice issues a request for enhancement to GUIslice to support loading JPGs from *.h files. Although, Calvin hasn't been very active lately so don't expect quick turn around. |
Beta Was this translation helpful? Give feedback.
-
@Pconti31 Thank you for you answer, i though it was possible because i saw an option. I think BMP works fine too, could you help me how to do it? |
Beta Was this translation helpful? Give feedback.
-
@RayOS9 Start by downloading my image converter GUIslice_Image2C this will allow you to create a *.c file from your jpg file. |
Beta Was this translation helpful? Give feedback.
-
@Pconti31 I am very grateful to you for helping me, unfortunately i had a lot of problems with size limitations you mentioned before, in the end i make it work only with SPIFFS. Thanks :) |
Beta Was this translation helpful? Give feedback.
@RayOS9 Start by downloading my image converter GUIslice_Image2C this will allow you to create a *.c file from your jpg file.
Then inside the builder select either ImageButton or Image widget to create a new image then select your new *.c file and the Builder should do the rest for you. Inside GUIslice/examples/builder/ex28_bld_btn_img_flash is an example project that uses *.c files as input.
Also, one for spiffs, if you decide to go that way. NOTE: size limitations on may exist on C arrays that are imposed by the various micro-controllers.
Paul--