/ Published in: VB.NET
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Function Base64ToImage(ByVal base64string As String) As System.Drawing.Image 'Setup image and get data stream together Dim img As System.Drawing.Image Dim MS As System.IO.MemoryStream = New System.IO.MemoryStream Dim b() As Byte 'Converts the base64 encoded msg to image data b = Convert.FromBase64String(b64) MS = New System.IO.MemoryStream(b) 'creates image img = System.Drawing.Image.FromStream(MS) Return img End Function