Displaying a PNG image from the Internet using the TFT_eSPI library ? #2632
-
Is it possible to display a PNG image found on the Internet that has dimensions of 220 x 132 and is an 8-bit image on the ESP32-2432s028 screen? The PNG images that I want to display are on a server in the local network, in a Set Top Box running a Linux OpenATV image. In fact, I want to display the icon of the current received channel. I can solve the received channel link problem, I managed to extract more data from the receiver and displayed on the ESP32-2432s028 screen. I also have a short video on YouTube showing what I have achieved so far. I am uploading one of the images to imgur.com to show you which PNG images I want to display: https://i.imgur.com/EdDUGsU.png It would be ideal to display them directly from the network. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There's an example here for a jpg that will give you some ideas, it downloads the file and saves it in LittleFS: Another example here using pngle, but the pngle decoder may not handle the 8 bit format: See TFT_eSPI library for an example of drawing a PNG from LittleFS: Ideally the file would be decoded as a stream so saving as a file would be unnecessary, but I do not have code for that! |
Beta Was this translation helpful? Give feedback.
-
I succeeded! A few days ago I posted the result on YouTube: https://youtu.be/W6XjNbb6O5A |
Beta Was this translation helpful? Give feedback.
There's an example here for a jpg that will give you some ideas, it downloads the file and saves it in LittleFS:
https://github.com/Bodmer/TJpg_Decoder/tree/master/examples/LittleFS/LittleFS_Web_Jpg
Another example here using pngle, but the pngle decoder may not handle the 8 bit format:
https://github.com/Bodmer/PNG_TEST_ONLY/tree/master/png_test_url_spiffs_2x
See TFT_eSPI library for an example of drawing a PNG from LittleFS:
https://github.com/Bodmer/TFT_eSPI/tree/master/examples/PNG%20Images/LittleFS_PNG
Ideally the file would be decoded as a stream so saving as a file would be unnecessary, but I do not have code for that!