c#将图片Image转换为内存流MemoryStream
HttpWebResponse resp = (HttpWebResponse)wRequest.GetResponse(); Stream stream = resp.GetResponseStream(); Image img = Image.FromStream(stream); byte[] back = null; MemoryStream memoryStream = new MemoryStream(); img.Save(memoryStream, ImageFormat.Jpeg); back = memoryStream.GetBuffer(); string str = Convert.ToBase64String(back);