PHP Code
<?php
Convert an image into code:
Dim ITC As New ImageToCodeClass
Dim Code as String = ITC.ImageToCode(YourImage)
Convert the code into an image:
Dim ITC As New ImageToCodeClass
PictureBox1.Image = ITC.CodeToImage("<YOUR IMAGE CODE HERE>")
Public Class ImageToCodeClass
Public Function ImageToCode(ByVal Img As Bitmap) As String
Return Convert.ToBase64String(DirectCast(System.ComponentModel.TypeDescriptor.GetConver?ter(Img).ConvertTo(Img, GetType(Byte())), Byte()))
End Function
Public Function CodeToImage(ByVal Code As String) As Image
Return Image.FromStream(New System.IO.MemoryStream(Convert.FromBase64String(Code)))
End Function
End Class

