Esphome: Decode PNG images from flash

Hi, I want do a “image carousel” with a Esphome and screen without internet access.

I have only 4MB flash from the ESP32, so, I need optimize the space for images.

The images have a few colors, so using a indexed png I can save 200+ images.

I saw that Online Image can download, decode and show images, but is need internet access. There are anyway to use Online Image for access a ESP32 flash storage?

Plain image ?

But plain image encode in plain format, so I can use png indexed compression.

Did you try it? I don’t see anything in the doc making me think it behaves differently then online images

Yes, I try it.

In the image online, the doc have warning about the PSRAM to decode the the image and only support PNG.

In Image, the ESPHome “compiler” convert the image to differents type with more or less bytes per pixel without compression.

For a 240x240 image, with RGB565, it is required 113k, with a Indexed PNG it is only 18k.

1 Like