Hi
I am trying to store an image in an xml file, i vcan store it fine but
the retreval is a bit of a problem:
To String:
Dim ms As New IO.MemoryStream
Dim arrImage() As Byte
Me.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)
arrImage = ms.GetBuffer
Dim UTF8 As New System.Text.UTF8Encoding
Dim imageString as string = UTF8.GetString(arrImage)
Getting it back:
Dim UTF8 As New System.Text.UTF8Encoding
Dim arrImage() As Byte = UTF8.GetBytes(imageString)
Dim ms As New IO.MemoryStream(arrImage)
Me.Image = System.Drawing.Image.FromStream(ms)
Getting it back throws an error on the final line, "Invaid Parameter
Used". If i complete the above without saving it as the InnerText on
an XmlNode in betwen it works fine.
Any ideas would be great.
Thanks
blu