Sub BlobToImage(Buffer() As Byte) as Bitmap
Public InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Public Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
return Bitmap1
End Sub
Usage:
rs = sql1.ExecQuery("SELECT pic FROM table")
....
....
'code from library example
sc.items.Add(CreateMap("data":"Item 1", "image":BlobToImage(rs.GetBlob("pic"))))
....
sc.slider.setitems(sc.items)
....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.