Guest User

Untitled

a guest
May 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.41 KB | None | 0 0
  1.     Private Function BytesToImage(ByVal buffer() As Byte) As Image
  2.         If buffer Is Nothing Then
  3.             Return Nothing
  4.         Else
  5.             Try
  6.                 Dim ms As New IO.MemoryStream(buffer)
  7.                 Dim img As Image = Image.FromStream(ms)
  8.                 Return img
  9.             Catch ex As Exception
  10.                 Return Nothing
  11.             End Try
  12.         End If
  13.     End Function
Add Comment
Please, Sign In to add comment