用于保存HTML中的远程图片的程序集
来源:互联网 发布:php base64 mp3 编辑:程序博客网 时间:2024/05/21 06:38
自己写了一个把html中的远程图片保存到本地程序并能正常显示的程序,现向大家分享,也希望大家多多提出建议和意见.
使用示例
[Test]
public void RmtImgSave()
{
string root = @"D:/Projects/GetImages/Bin/";//这里是测试文件的跟路径
string html = System.IO.File.ReadAllText(root + "test.html");//含有远程文件图片的html 即src=http://之类的图片
string saveto = root;
html = ImgGet.SaveImagesFromHtml(html, "", saveto);图片保存到和页面相同的目录下
System.IO.File.WriteAllText(root + "test_ok.html", html, Encoding.Default);
html = System.IO.File.ReadAllText(root + "test.html");
saveto = root + "imgs";
html = ImgGet.SaveImagesFromHtml(html, "imgs", saveto);//图片保存到Imgs目录下
System.IO.File.WriteAllText(@root + "test_ok_imgs.html", html, Encoding.Default);
}
点击下载此文件
使用示例
[Test]
public void RmtImgSave()
{
string root = @"D:/Projects/GetImages/Bin/";//这里是测试文件的跟路径
string html = System.IO.File.ReadAllText(root + "test.html");//含有远程文件图片的html 即src=http://之类的图片
string saveto = root;
html = ImgGet.SaveImagesFromHtml(html, "", saveto);图片保存到和页面相同的目录下
System.IO.File.WriteAllText(root + "test_ok.html", html, Encoding.Default);
html = System.IO.File.ReadAllText(root + "test.html");
saveto = root + "imgs";
html = ImgGet.SaveImagesFromHtml(html, "imgs", saveto);//图片保存到Imgs目录下
System.IO.File.WriteAllText(@root + "test_ok_imgs.html", html, Encoding.Default);
}
点击下载此文件
- 用于保存HTML中的远程图片的程序集
- 用于下载HTML中远程图片的方法
- 简单的远程图片保存
- C#用于Windows程序的HTML编辑器
- C# 远程保存图片 图片远程保存
- 保存bmp图片的程序
- FckEditor远程图片保存的插件
- 保存远程图片到本地的办法
- 自动保存远程图片
- ASP远程保存图片
- 保存远程图片
- BAE保存远程图片
- ASP.NET下载远程图片保存到本地的方法、保存抓取远程图片
- 使用程序保存网页中的图片 网络读取图片
- 图片保存到数据库的小程序
- 图片保存到数据库的小程序
- js正则:获取css与html中的图片名字,用于清理不再使用的图片(正则的效率问题建议不使用)
- FCKeditor 远程保存图片 插件
- 把指定的DataSet中的内容导出到Excel中
- 使用嵌套字用FTP协议进行文件上传下载!
- 无题~~~~~~~~~~~~~~
- 多线程委托回调
- 我的异步查询数据库 的类
- 用于保存HTML中的远程图片的程序集
- Visual Basic.net还是C#
- yuv420 转bmp的方法
- 本地硬盘安装red hat linux 9.0
- 15条人生建议--导师送给我的
- WebSite项目和WebApplication项目有何区别
- distinct性能问题一
- 居然错过了复旦北区修车铺的打人事件……
- GridView加入CheckBox实现跨页CheckBox全选