Android Question Base64 encode/decode image library error

Alberto Michelis

Active Member
Licensed User
Hi, trying to test this library
https://www.b4x.com/android/forum/threads/base64-encode-decode-image-library.31031/
Using a button and a text field to see the resulting blob2base64.
Im getting an error in the folowing code:
B4X:
Sub btnVerBlob64_Click
    Log("Pasando " & TesteoPHP.ViendoImagen & " a base64")
    Dim B64Str As String = Base64Con.EncodeFromImage(File.DirDefaultExternal, TesteoPHP.ViendoImagen)
    txtBlob64.Text = B64Str
End Sub
TesteoPHP.ViendoImagen is the mage name and it really exists.

The error is :
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String anywheresoftware.b4a.objects.StringUtils.EncodeBase64(byte[])' on a null object reference
 
Top