Dim fs As New IO.FileStream("F:\hyphen\Pictures\QQ图片20160921213959.jpg" , IO.FileMode.Open , IO.FileAccess.Read) '用文件流打开图片
Dim br As New IO.BinaryReader(fs) '根据文件流,申明一个二进制阅读器
Dim ImageByte() As Byte = br.ReadBytes(fs.Length) '阅读器读取文件流,并将独到的二进制放入数组ImageByte中,
Dim ImageString As String = Convert.ToBase64String(imageByte) ' SQLCommand 不能直接Insert 二进制,只能拼接SQL语句,所以这里把二进制变成字符
Output.show(ImageString)
Dim zimageByte() As Byte = Convert.FromBase64String(ImageString)
Dim image As Image = Image.FromStream(New IO.MemoryStream(zimageByte))
e.Form.Controls("PictureBox1").image = image