I am working on vb.net windows application.
I have a picture in my 6th Cell of data grid view. I want to save that image in database.
So I write code like this:
Dim ms As New MemoryStream()
Dim imgCon As New ImageConverter
ms.Read(imgCon.ConvertTo(gv.Rows(0).Cells(6).Value, GetType(Byte())), 0, 1024)
Dim data As Byte() = ms.GetBuffer()
But here my image is not converting Byte array? How I can convert my data grid view image to byte array? Any help is very appreciable.