base64ToImage
Converte base64 image em imagem
Source
<Extension()> _
Public Function toImage(ByVal base64String As String) As Image
Try
Dim b As Byte()
b = Convert.FromBase64String(base64String)
Dim ms As New System.IO.MemoryStream(b, 0, b.Length)
ms.Write(b, 0, b.Length)
Return Image.FromStream(ms, True)
Catch ex As Exception
Return Nothing
End Try
End Function
Example
str_base64.ToImage