Go Down

Topic: Read BMP/JPG/PNG image from internet and write to LCD Display (Read 108 times) previous topic - next topic

parag_shar

Hi,
I have seen several examples of reading BMP images, and writing it to the display. However is it possible to render a PNG or JPG image to the display? What is the reason in almost all examples, only BMP images are being rendered on an LCD display?

In addition how to go about with reading an image from internet (a web URL), and then display it on LCD/TFT?

Parag

AWOL

Quote
What is the reason in almost all examples, only BMP images are being rendered on an LCD display?
Bitmap images don't need decoding
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

bodmer

PNG images use a complex lossless compression algorithm that is tricky to implement in the limited resources of the common Arduino boards.  Mostly you need more memory, then to decode the image in a reasonable time your need a lot more processing power.

JPEG images can be handled, but the humblest processor you could use in an Arduino Mega and that takes 5 seconds to decode a 480 x 320 image. Due takes 1s and an ESP8266 about 0.6s. There is a library here if you want to experiment.

To pull an image off the web you need an Ethernet or WiFi connection and setup your Arduino as a Web or HTTP client, then issue a http GET command with the image url.  The problem is that the server can chuck so much data at the Arduino so fast that it will not be able to cope and it won't have enough memory to store it anywhere before decoding the image. 

Having said that, in principal an Arduino could handle very small images from the internet. But when you can buy a smart phone for less than $50 there is little point.
Formerly Rowboteer (now a broken user profile!)

bodmer

There are quite powerful little boards called NodeMCU that work with the Arduino IDE.

In this project the author has connected to Google maps API and, pulled down a map of the local area and displayed it on the TFT.

I've run the sketch (it is a bit of a monster collection of files) and it works well.  The bits of code that do this are in the GeoMap.cpp file inside the sketch folder.

So it is possible and has been done, but an UNO would not be able to cope!
Formerly Rowboteer (now a broken user profile!)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy