i look up extentions image to base64
like : https://www.base64-image.de
this extention only bmp file, i want jpg file
i guess you didn’t look here. There you see they are using an jpg.
i try use com.ghostfox.SimpleBase64.aix, but error :
Attempt to invoke virtual method ‘boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)’ on a null object reference
Please show your blocks
this my block…
because the file size is too big?
Test it with a smaller image.
smaller image success
So it has to do with imagesize then.
yes, and now I have to look for extensions for the camera to automatically change the quality of the photos
No that is not the problem, Peter. What you have to do is to replace “file://” with an empty text before passing to Encode method. So it would be Encode(Replace(text: path; target: “file://”; replacement: “”;))
please, show block?
i don’t understand
Don’t pass image’s raw path to Encode function. First replace “file://” in your path with “” and then use Encode function.