Hello everyone...I am able to save image to remote database. But not stable most of the time it fails to convert it back to image.
Here is the code I'm using..
Most of the time I'm getting "Error conversion to image file." Any help is much appreciated.
Here is the code I'm using..
B4X:
Case "SearchImageId"
Dim ListOfImage As List
Dim repId As String
Dim image As String
ListOfImage = parser.NextArray 'returns a list with maps
If ListOfImage.Size=0 Then
Log("No rep_id IMAGE found...")
Else
Log("Size of List: "& ListOfImage.Size)
For i = 0 To ListOfImage.Size - 1
Dim MyData As Map
MyData = ListOfImage.Get(i)
repId = MyData.Get("rep_id")
image = MyData.Get("image")
Next
Try
Log(repId & " " &image.Length)
Dim im As Bitmap
im.Initialize2(blobToIO(image))
imgphoto.SetBackgroundImage(im)
Log("Image Found!!")
Catch()
Log("Error conversion to image file.")
End Try
End If