I am trying to figure out how to convert an image to base64 on the ESP32 Cam board so I could then send it to AWS s3 bucket. Could someone please give me some insight?
1 Answer
The first problem we have here is: ESP32 may not have enough RAM to do it.
There are a few examples on the web on how to save data collected from the ESP32-CAM to a microSD card. If you are familiar with that, you can now take a look on the base64.h library for the ESP32 arduino enviroment. If not, there is a very comprehensive tutorial by Rui Santos on YouTube, which you can find on this link.
Base64.h is a library for ESP32 (core) that implements the base64 conversions as simple as decode and encode. You can take a look on the source on github.
I never used the ESP32-CAM, but the result you want to achieve seems very simple to me. Have a look on those links and give it a try.
-
I talked with Rui on his forum. He said something about using encode function. But I cant find the comment. TBH it is a bit over my head how to implement that github library Aug 16, 2019 at 21:40
how to convert an image to base64 on the ESP32 Cam board
"? Don't you have the image as a file or data structure?