Hi - I am trying to convert a text string to png image file. I am trying below code in VB.NET
Dim textString As String = "P1BORw0KGgoAAAANSUhEUgAAAj8AAAAd"
Dim textBytes As Byte() = Convert.FromBase64String(textString)
Dim Base64Decoded As String = System.Text.ASCIIEncoding.ASCII.GetString(textBytes)
'reading the string from memoerystream
Dim ms As System.IO.MemoryStream = New System.IO.MemoryStream(Base64Decoded)
ms.Position = 0
Dim sr As StreamReader = New StreamReader(ms)
Dim myStr As String = sr.ReadToEnd()
In the above code, I am trying to read the string back by uisng Base64Decoded it fails on Me ...
Go to the complete details ...