G
Guest
I was make an function which reads file from windows path and read that image
with bytereader I able to make it,
Then I try to get that image from httpwebrequest but I get convert'ing
problems
stream to string to byte[] to base64?
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(imagelink);
HttpWebResponse myResponse=(HttpWebResponse)myRequest.GetResponse();
Stream mystream=myResponse.GetResponseStream();
StreamReader mystreamReader=new StreamReader(mystream);
string result=mystreamReader.ReadToEnd();
byte[] mybytes;
mybytes=new System.Text.ASCIIEncoding().GetBytes(result);
returnstring+=Convert.ToBase64String(mybytes);
Thanks for your help.
with bytereader I able to make it,
Then I try to get that image from httpwebrequest but I get convert'ing
problems
stream to string to byte[] to base64?
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(imagelink);
HttpWebResponse myResponse=(HttpWebResponse)myRequest.GetResponse();
Stream mystream=myResponse.GetResponseStream();
StreamReader mystreamReader=new StreamReader(mystream);
string result=mystreamReader.ReadToEnd();
byte[] mybytes;
mybytes=new System.Text.ASCIIEncoding().GetBytes(result);
returnstring+=Convert.ToBase64String(mybytes);
Thanks for your help.