Android Question send image to mysql database

ArminKH

Well-Known Member
Hi every one
I want send an image from image view to my database on server pls explain for me about this my search came up with nothing
Tnx for your response
 

keirS

Well-Known Member
Licensed User
Or HERE. But which ever way you want to connect to you DB you need convert your Image view to a Byte Array

B4X:
 Dim IView As ImageView
 Dim Bmap As Bitmap
 Dim OStream As OutputStream
 Dim OStream.InitializeToBytesArray(1)
 Dim BArray(1) As Byte
 IView.Initialize("Iview")
 IView.Bitmap = LoadBitmap(cSomedir,"IMG1.JPG")
 Bmap = IView.Bitmap
 Bmap.WriteToStream(OStream,100,"PNG")
 OStream.Close
 BArray = OStream.ToBytesArray
 

ArminKH

Well-Known Member
Can u please post the php side codes?
 
Top