🤖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

    Scheduled Pinned Locked Moved Arduino
    3 Posts 2 Posters 7.2k Views
    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 Offline
      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 Offline
        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 Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post