Forum Moderators: open
Here's the latest I have:
Dim bytValue() As Byte 'an array of bytes
Dim encodedstring As String 'the incoming string Image
encodedstring = elemList(indx).ChildNodes(2).InnerText
encodedstring = bs64.DecodeStr64(encodedstring) 'this is a function supplied by UPS to decode the string, if I use the .NET convert.fromBase64String I get a "Invalid character in a Base-64 string." error, which makes me suspicious
Dim f As File
Dim fs As FileStream
fs = f.Create(SamplePath & drDetail.strTrackingNumber & ".gif") 'create the file
Dim w As New BinaryWriter(fs)
w.Write(encodedstring)
w.Close()
I have also tried using byte arrays and writing to the file with those, and my image still isn't correct.