🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5StickC: Cannot write BMP/JPG/RAW to the lcd from memory

    General
    3
    3
    4.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      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?)

      ajb2k3A 1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3 @reganel
        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.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • R
          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post