It's a jpeg picture. When I encode the jpeg file via the following website
http://www.motobit.com/util/base64-decoder-encoder.asp
I get a base 64 string that represents the file like so: "/9j/4AAQSkZJRgABAQAAAQABAAD/2w..."
<div id=":ye">So my object is to extract the completely similar 64 base string from a sequence of bytes. I do it like below:
<div> <div></div> <div> <div>byte[] BytesMessageUTF = UTF8Encoding.Unicode.GetBytes(e.Data);</div> <div>string strImagestr = Convert.ToBase64String(BytesMessageUTF);</div> </div> <div></div> <div>So if I set a breakpoint in VS 2010 I'll see that I
could extract in many ways similar 64 base string.
"/f//4AAQSkZJRgABAQAAAQABAAD9/w..."
The only difference is a couple of header and footer characters. And that's the problem needs to be addressed. Any help will be greatly appreciated.</div> </div> </div>
hokushin
0 Points
2 Posts
Problem with decoding jpeg image
Feb 28, 2012 02:36 PM|LINK
Hello folks!
I retrieve binary stream from the server like below:
<div> {</div> <div> receivestr = UTF8Encoding.Unicode.try
base64-decoder-encoder.asp
<div id=":ye">So my object is to extract the completely similar 64 base string from a sequence of bytes. I do it like below:It's a jpeg picture. When I encode the jpeg file via the following website http://www.motobit.com/util/
I get a base 64 string that represents the file like so: "/9j/4AAQSkZJRgABAQAAAQABAAD/2w..."
<div> <div></div> <div> <div>byte[] BytesMessageUTF = UTF8Encoding.Unicode.GetBytes(
"/f//4AAQSkZJRgABAQAAAQABAAD9/w..."
The only difference is a couple of header and footer characters. And that's the problem needs to be addressed. Any help will be greatly appreciated.</div> </div> </div>