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
 
Or HERE. But which ever way you want to connect to you DB you need convert your Image view to a Byte Array

Code:
 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
 
Upvote 0
Back
Top