Function ToImage(ByVal byteData() As Byte) As Image Using stm As New System.IO.MemoryStream(byteData) Return Image.FromStream(stm) End Using End Function