Public Shared Function ByteToImage(blob As Byte()) As Bitmap
Dim mStream As New MemoryStream()
Dim pData As Byte() = blob
mStream.Write(pData, 0, Convert.ToInt32(pData.Length))
Dim bm As New Bitmap(mStream, False)
mStream.Dispose()
Return bm
End Function