martinberlin / eink-calendar

A very easy, almost zero-configuration, ESP8266/ESP32 E-ink calendar. Caution: UNMAINTAINED Please use CalEPD / Cale-idf
http://cale.es
MIT License
103 stars 9 forks source link

6/9 Add JPEG support in cale_tft branch #16

Closed martinberlin closed 4 years ago

martinberlin commented 4 years ago

This is an experiment just to try JPG instead of BMP. But the target won't be an Eink, just a small TFT735 color display.

martinberlin commented 4 years ago

Waiting for a 2.8 " Zoll Nextion NX3224T024 HMI LCD TFT Touch Display coming to the office next Tuesday / Wed 24 or 25 March '22

martinberlin commented 4 years ago

After last commit and thanks to awesome Bodmer's JpegDecode the TFT is already showing the jpeg downloaded from CALE. I've an idea to use a refresh tough and is the following:

http://img.cale.es/jpg/fasani/5ea1dec401890/hash

md5(jpeg) make a hash of the jpg contents. On setup() always render the image and save last md5 hash on Preferences. But on the loop, every 3 minutes, just check the remote hash. Only download the image if the JPG has changed. This way we avoid abusing CALE engine and at the same time avoid to refresh the TFT display just to show the same image.

martinberlin commented 4 years ago

Is working, so we are closing here, this remains in cale_tft branch just as a demo of how to use CALE as download web-service to feed a TFT display