sibbl / hass-lovelace-kindle-screensaver

This tool generates a png from a Home Assistant Lovelace view, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
MIT License
311 stars 71 forks source link

Add Support for Bitmap-Output #122

Open DerPicknicker opened 2 months ago

DerPicknicker commented 2 months ago

Hi,

it would be great if the docker container supports .bmp Files as an output. This would help to use cheap esp32 devices. Because the popular libraries doesn't support jpg the conversion is memory intensive and the esp32 is not powerful enough to handle that.

I did a small research and your used library for creating the jpg files is also capable to create the bmp.

Would be a nice addition for this project.

sibbl commented 2 months ago

Hey,

could you please provide which libraries and devices the output should be compatible for? If there are more details on which bmp requirements to follow it shouldn't be that much work to add this.

Thanks in advance!

DerPicknicker commented 2 months ago

Hey @sibbl ,

thank you for the fast response. The main goal would be that I can use this great docker container to send images to ESP32 devices.

See this library : https://github.com/ZinggJM/GxEPD2/tree/master

It supports drawing from HTTP(S) but the file must be encoded as an Bitmap. Because the esp32 is limited by its ram so you can't store both / convert it locally.

Here is an example: https://github.com/ZinggJM/GxEPD2/blob/master/examples/GxEPD2_WiFi_Example/GxEPD2_WiFi_Example.ino