I am trying to save an image in a text file.
here is what I am doing:
Dim writer As New System.IO.StreamWriter("D:\Object.txt", True)
Dim temp() As Byte = convertImageToBytes(i.setBitmap)
Dim str = System.Text.Encoding.ASCII.GetString(temp)
I get the count of the temp (byte array) and note it down.
next when I want to read that array, i use:
Dim byteArray() As Byte
byteArray = System.Text.Encoding.ASCII.GetBytes(reader.ReadLine.ToString)
Dim b As Bitmap = imgConverter.ConvertFrom(byteArray)
here also the count is same.
but when I convert the byte array to image, I get a Big Cross!!!
What could be the problem?
Also, I would like to put in my object's properties in text like name, location, etc.
BYTE ARRAY HERE
Can someone help me in writing the image data to a text file?
Thanks in Advance!!!