M5StickC: Cannot write BMP/JPG/RAW to the lcd from memory
reganel last edited by
Hi. I'm using the last version of firmware (1.6.0), and there is so many differences between it and micropython code samples from 2018-2019. I wanna print the image, loaded from my local server. I wanna write raw bmp array right to the screen like here: https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/blob/fede6f610c9952c7242fc309c2bb4efc9afb0919/MicroPython_BUILD/components/micropython/esp32/modules/ssd1306.py
There are any solutions for writing, except for pixel-by-pixel?)
ajb2k3 last edited by
@reganel Images have to be formatted and saved in a very specific way to be used. this is a limitation of Micropython.
The exact specifications required are written down in several post o this forum. please use the search function to find those requirements.
robalstona last edited by
@reganel You could save the image to a file and load it back to the display, but with frequent writing to the flash memory, you will damage it very quickly. I tried to load a bitmap into a variable and draw from it pixel by pixel on the screen, but esp does not have enough ram memory (for a 24 bit 80x160 bitmap some 38kB). From what I've seen, the C libraries for arduino allow you to write an image from a buffer. The only thing I was able to get is reading a jpg image through mqtt (size about 10kB), saving to a file and from a file to the screen. But as mentioned before, flash memory has a limited number of write cycles.