Need image to base64


i look up extentions image to base64
like :



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$CompressFormat, int,’ 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 :pensive:


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.


Hey I Also Have Same Problem Can AnyOne Solve My Problem

plz solve my problem as much as possible


Did you read the topic and did it work for you?


Please read my 2 older replies here.