Ok, so thats how you do it ... thanks, Dominick.

Signature
Samba!
> Hello Samba,
>
[quoted text clipped - 9 lines]
> > Can I please have a very small code snippet to convert byte[] to
> > string and back using Base64? Advance thanks.
I'm using this functionality to try to load an image that's returned to me
in an XML file. The converstion to the byte array works fine.
Than I move the byte array into a memory Stream using ...
Dim stmBLOBData As New MemoryStream(binaryData)
which also seems to work fine, but the following line which should actually
create the image failes with a "Invalid Parameter used".
img = Image.FromStream(stmBLOBData)
Is this really a problem with my conversion? Any ideas how to debug?
Dominick Baier [DevelopMentor] - 25 Oct 2005 17:25 GMT
Hello Steve,
From/To base64 conversion is lossless...
not sure what your problem is.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
>> Hello Samba,
>>
[quoted text clipped - 21 lines]
>
> Is this really a problem with my conversion? Any ideas how to debug?
Marcello Cantelmo - 25 Oct 2005 23:47 GMT
> I'm using this functionality to try to load an image that's returned to me
> in an XML file. The converstion to the byte array works fine.
[quoted text clipped - 10 lines]
>
> Is this really a problem with my conversion? Any ideas how to debug?
arrImg...is your bytearray ;-)
Dim _stream As New MemoryStream(_arrImg, True)
stream.Write(_arrImg, 0, _arrImg.Length)
PictureBox1.Image = New Bitmap(New Bitmap(_stream))
_stream.Close()
best regards,
Marcello Cantelmo
www.cantelmosoftware.com
try for free Goliath.NET Obfuscator - the last secure obfuscator for .NET
platform