base64ToImage

 <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

Description

Converte base64 image em imagem

Details

Double click on the code to select all.

 

;