jayel Active Member Licensed User Longtime User Jul 2, 2012 #1 Hello, I've been searching around but can't find it. I have a table with products and an image(foto) of that product. I can get de product name & product code in a json array and put it on a listview. But now when I click the product in de listview I want the picture of that product shown on my android . Can somedy help please? Greets, John
Hello, I've been searching around but can't find it. I have a table with products and an image(foto) of that product. I can get de product name & product code in a json array and put it on a listview. But now when I click the product in de listview I want the picture of that product shown on my android . Can somedy help please? Greets, John
Erel B4X founder Staff member Licensed User Longtime User Jul 3, 2012 #2 You will need to convert the image BLOB to a string by encoding it in base 64 in the PHP script. You will then need to convert it to bytes in the client. Upvote 0
You will need to convert the image BLOB to a string by encoding it in base 64 in the PHP script. You will then need to convert it to bytes in the client.
jayel Active Member Licensed User Longtime User Jul 3, 2012 #3 Thanks Erel, Code: Dim m As Map m = l.Get(0) Dim b() As Byte Dim bmp As Bitmap Dim s As StringUtils Dim i As InputStream b =s.DecodeBase64(m.Get("afbeelding")) i.InitializeFromBytesArray(b,0,b.Length) bmp.Initialize2(i) i.Close ImgAfbeelding.Bitmap = bmp SOLVED ! greets, John Upvote 0
Thanks Erel, Code: Dim m As Map m = l.Get(0) Dim b() As Byte Dim bmp As Bitmap Dim s As StringUtils Dim i As InputStream b =s.DecodeBase64(m.Get("afbeelding")) i.InitializeFromBytesArray(b,0,b.Length) bmp.Initialize2(i) i.Close ImgAfbeelding.Bitmap = bmp SOLVED ! greets, John
AJ Ramone New Member Licensed User Longtime User May 21, 2014 #4 How must the php Script look like? The php Script is like explained in the mysql database tutorial. I have changed the Code like jayel posted but I am still getting an load image error. Upvote 0
How must the php Script look like? The php Script is like explained in the mysql database tutorial. I have changed the Code like jayel posted but I am still getting an load image error.