drawing a base64 encoded image on M5Stack Core
-
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.
-
@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.
-
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
SPIFFSand then callM5.Lcd.drawJpgFile(SPIFFS, jpgFileName, 0, 0);
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