`
a420144030
  • 浏览: 81553 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

抓取并制作网页缩略图

阅读更多

在windows环境下,可以考虑这个工具软件来抓页面截图:
IECapt.exe
在linux环境下,可以考虑这个工具软件来抓页面截图:
HTML2Image
获得抓取工具之后,就可以采用任何一种服务器语言编写程序,调用这个抓取工具,然后把抓取结果返回给用户。
下面是利用IECapt.exe并结合PHP抓取网站截图的例子。
在Windows/Apache2.2/Php5.2.5 下运行通过。

参考资料:
1.http://www.zubrag.com/scripts/website-thumbnail-generator.php
2.http://www.guangmingsoft.net/htmlsnapshot/html2image.htm

 

IECapt

IECapt is a small command-line utility to capture Internet Explorer's rendering of a web page into a BMP, JPEG or PNG image file. The C++ version also has experimental support for Enhanced Metafile vector graphic output. IECapt is available in a C++ and a C# version.

See CutyCapt for a Qt and WebKit (Safari) based cross-platform alternative to IECapt.

Samples

Here are some samples of IECapt generated renderings:

Status

"Works for me" :-) The current version is not very verbose, it does not catch or report errors, it has some general limitations and there are some known bugs to be addressed in future versions.

Requirements

IECapt depends on GDI+. GDI+ is included in Windows XP/2003/Vista/2008. If there is no gdiplus.dll on your system, you can download it from Microsoft and put it into the same directory where IECapt.exe resides.

Download

IECapt-2008-06-10.zip (2008-06-10, 54 KB)

IECapt-2008-04-27.zip (2008-04-27, 51 KB)

IECapt-2006-11-06.zip (2006-11-06, 52 KB)

Source code

The source code is available in the CVS repositorty.

Usage

Open a command prompt and ask for help:

C:\> IECapt --help
 -----------------------------------------------------------------------------
 Usage: IECapt --url=http://www.example.org/ --out=localfile.png
 -----------------------------------------------------------------------------
  --help                      Print this help page and exit
  --url=<url>                 The URL to capture (http:...|file:...|...)
  --out=<path>                The target file (.png|bmp|jpeg|emf|...)
  --min-width=<int>           Minimal width for the image (default: 800)
  --max-wait=<ms>             Don't wait more than (default: 90000, inf: 0)
  --delay=<ms>                Wait after loading (e.g. for Flash; default: 0)
  --silent                    Whether to surpress some dialogs
 -----------------------------------------------------------------------------
 http://iecapt.sf.net - (c) 2003-2008 Bjoern Hoehrmann - <bjoern@hoehrmann.de>

IECapt#

IECapt# is a new and experimental version of IECapt written in C#. The source code is available in the CVS repositorty: IECapt.cs and IECaptComImports.idl. Feedback and patches welcome. To build it, use:

  1. midl IECaptComImports.idl
  2. tlbimp IECaptComImports.tlb
  3. aximp %SystemRoot%\system32\shdocvw.dll
  4. csc /r:IECaptComImports.dll /r:AxSHDocVw.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll IECapt.cs

Author

Björn Höhrmann bjoern@hoehrmann.de (Donate via SourceForge)

分享到:
评论

相关推荐

    mypic图片管理程序 v1.31

    ·自动提取首张图片为缩略图 ·自动生成任意大小缩略图 ·幻灯片模式图片展示页, ·模板分离设计,轻松设计模板 ·方便自由的模板方法,可以实现复杂多样的调用效果 MyPicV1.3.1 ----------------------- 1.优化:后台...

    C#开发实例大全(基础卷).软件开发技术联盟(带详细书签) PDF 下载

    实例200 向窗体中拖放图片并显示 268 实例201 使应用程序在进程中消失 269 9.2 其他窗体技术 270 实例202 在关闭窗体时弹出确认对话框 270 实例203 隐藏应用程序在任务栏中的图标 272 实例204 实现动态系统托盘图标 ...

    艺帆心理学网站源码【艺帆1.7】.rar

    本源码是模板i心理学网站制作的,代码简洁没有多余的代码影响搜索引擎蜘蛛的数据抓取。 出于演示目的我全部调用了文章类别的第一个分类显示在首页,需要的用户下载后可以自行修改。 通用标签说明: (1,510)%&gt; ...

    C#公共类源代码 带帮助文档

    图片对象比较、缩放、缩略图、水印、压缩、转换、编码等操作辅助类(ImageHelper.cs) 输入法帮助,全角 转换为半角(ImeHelper.cs) Winform提示框 的摘要说明。(MessageUtil.cs) 包含互操作方法调用的应用程序中...

    在线客房预订系统源码

    图片管理模块:无限分类,支持相册模式,支持远程图片上传,支持本地图片上传,支持GD模块生成缩略图。 用户管理模块:用户分组管理,可以挂接任何mysql数据库的用户数据表,例如IPB,DISCUZ.. 栏目管理模块:可以添加...

    明日科技C#示例源码

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿...

    C#示例(配套光盘源码)第四部分

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图功能 ...

    C#示例(配套光盘源码)第五部分

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图功能 ...

    C#示例(配套光盘源码)第三部分

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图功能 ...

    C#示例(配套光盘源码)第一部分

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图功能 ...

    C#示例(配套光盘源码)第二部分

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图功能 ...

    明日科技C#示例源码.part01

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图...

    明日科技C#示例源码.part03

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图...

    明日科技C#示例源码.part04

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图...

    明日科技C#示例源码.part02

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图...

    明日科技《C#示例源代码》(13-16)

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图...

    明日科技《C#示例源代码》(17-20)

    实例023 生成图片缩略图 88 实例024 不失真压缩图片 90 实例025 批量图像格式转换 93 实例026 屏幕颜色拾取器 96 实例027 为数码照片添加日期 98 实例028 批量添加图片水印 100 实例029 仿QQ截图...

Global site tag (gtag.js) - Google Analytics