Hello everyone,
Currently I am using Camera2 library to take pictures and then converting the pictures to base64 and creating a json string that sends it to my PHP server.
The PHP server then collects the Json and convert the base64 back to an image and process it.
This works fine if I set the capture resolution to 1920x1080. The result of the image is about 1MB.
If I try to set a higher resolution for the capture, the program crashes due to "out of memory" error.
Did anyone here create a process or function that upload larger images to their server without using base64 since when you convert to base64, the data is larger?
I was thinking maybe split the base64 text into parts and upload it, but maybe someone else has a better idea?
Currently I am using Camera2 library to take pictures and then converting the pictures to base64 and creating a json string that sends it to my PHP server.
The PHP server then collects the Json and convert the base64 back to an image and process it.
This works fine if I set the capture resolution to 1920x1080. The result of the image is about 1MB.
If I try to set a higher resolution for the capture, the program crashes due to "out of memory" error.
Did anyone here create a process or function that upload larger images to their server without using base64 since when you convert to base64, the data is larger?
I was thinking maybe split the base64 text into parts and upload it, but maybe someone else has a better idea?