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
SPIFFS
and then callM5.Lcd.drawJpgFile(SPIFFS, jpgFileName, 0, 0);