Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function BytesToImage(ByVal buffer() As Byte) As Image
- If buffer Is Nothing Then
- Return Nothing
- Else
- Try
- Dim ms As New IO.MemoryStream(buffer)
- Dim img As Image = Image.FromStream(ms)
- Return img
- Catch ex As Exception
- Return Nothing
- End Try
- End If
- End Function
Add Comment
Please, Sign In to add comment