[C#] 纯文本查看 复制代码
protected void Page_Load(object sender, EventArgs e)
{
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://www.sufeinet.com/template/veikei_dz_life_20130810_plus/images/logo.png?2014-06-06",
Method = "get",//URL 可选项 默认为Get
ResultType = ResultType.Byte
};
HttpResult result = http.GetHtml(item);
Image img = byteArrayToImage(result.ResultByte);
}
/// <summary>
/// 字节数组生成图片
/// </summary>
/// <param name="Bytes">字节数组</param>
/// <returns>图片</returns>
private Image byteArrayToImage(byte[] Bytes)
{
MemoryStream ms = new MemoryStream(Bytes);
return Bitmap.FromStream(ms, true);
}
[C#] 纯文本查看 复制代码
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://www.sufeinet.com/template/veikei_dz_life_20130810_plus/images/logo.png?2014-06-06",
Method = "get",//URL 可选项 默认为Get
};
Image img = http.GetImage(item);