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

    drawing a base64 encoded image on M5Stack Core

    Arduino
    2
    3
    5.9k
    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.
    • M
      m5er
      last edited by

      Greetings,
      Do you have a minimal example in Arduino/C showing how to draw a base64 encoded image? Imagine I have an image that is saved as a base64 string (either in a string variable or in a text file, doesn't matter). The question why I have the image as base64 encoded string is out of scope :). How do I draw this image on the screen of an M5Stack Core? Thanks in advance!

      Note that I am not talking about encoding an image to base64, nor about serving (webpages containing) base64 images. I have a base64 encoded image saved on the M5Stack Core and I want to display it on the screen.

      A 1 Reply Last reply Reply Quote 0
      • A
        AgreeDK @m5er
        last edited by

        @m5er you can try search for a base64 decoder in C/C++ and implement that, I have not been able to find any library to 'just' display the base64 ebcoded image.

        1 Reply Last reply Reply Quote 0
        • M
          m5er
          last edited by

          For those who are interested, the code at the end of this tutorial works well. The tutorial is about strings, but works in exactly the same way for base64-encoded jpg images. All you have to do after decoding the string (containing the base64-encoded jpg image) is to write it to SPIFFS and then call M5.Lcd.drawJpgFile(SPIFFS, jpgFileName, 0, 0);

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