html to image in c,Website Page Thumbnail, Screenshot, HTML to Image in .Net Application (ASP.NET, C...

The Websites Screenshot DLL is a .NET Class Library to render website page. It allows you to capture website page and create full size screenshot or thumbnail preview in a number of different formats like JPG, GIF, PNG, BMP and TIF.

You can use this dll for the following web or windows programming task.

To capture full size screenshot of website page.

To create thumbnail image of website page.

To convert HTML code to image.

Websites Screenshot DLL is very flexible, powerful and fast. It includes many options to customize the webpage image capturing process. Suppose you want to produce a 200 x 300 PNG thumbnail image of the www.msn.com. This is the code you need.

C# .NET code sample: (Add reference to WebsitesScreenshot.dll in your project.)

Namespace: WebsitesScreenshot

WebsitesScreenshot.WebsitesScreenshot _Obj;

_Obj = new WebsitesScreenshot.WebsitesScreenshot();

WebsitesScreenshot.WebsitesScreenshot.Result _Result;

_Result = _Obj.CaptureWebpage("http://www.msn.com");

if (_Result == WebsitesScreenshot.

WebsitesScreenshot.Result.Captured)

{

_Obj.ImageWidth = 200;

_Obj.ImageHeight = 300;

_Obj.ImageFormat = WebsitesScreenshot.

WebsitesScreenshot.ImageFormats.PNG;

_Obj.SaveImage("c:\\msn.png");

}

_Obj.Dispose();

And here is the thumbnail you get.

8b6e53777147def13c375c655d23a08f.png

However, if you don't want to save your image to a local file, you can also get it in a memory object. You can use this component in any .NET supported languages (VB, C#, ASP etc...)

Key Features

Generate website thumbnail image.

Capture full size screenshot of any web page.

Convert HTML to image.

Support saving resulting image both to local file and in memory.

Take a snapshot of a whole webpage into one image without scrollbars.

Ability to retrieve page for capturing via HTTP, HTTPS, or from a local file.

Supports JPG, GIF, PNG, BMP and TIF image formats.

Ability to set JPEG quality (compression) percent.

Works both in 32-bit and 64-bit environments.

Assemblies for .NET 2.0 and .NET 4.0

No printer driver or any third party tools.

Supports capturing site with flash content.

Get links, title or html source of a page.

Ability to enable or disable scripts, ActiveX, Java.

Ability to set timeout seconds of web page to load.

Supports delayed snapshots of web page.

Configurable capture area width and height.

Multithreaded architecture for simultaneous processing of multiple requests.

What's New in The Latest Version

Preserve the original aspect ratio when saving the image with given width or height. It is use full when you want to save the fixed width thumbnail or fixed height thumbnail image (PreserveAspectRatio).

HTML utility methods added:

GetHtmlDocument: You can get the HTML document (IHTMLDocument2) of the captured website page.

GetDocumentTitle: Get the title of the web page just snapped.

GetDocumentText: Get the text content of the web page just snapped.

GetDocumentLinks: Get the URLs of links on the web page just snapped.

GetDocumentImages: Get the URLs of images on the web page just snapped.

GetDocumentFrames: Get the URLs of frames on the web page just snapped.

(Version History)

Sample Output Images (click on thumbnail to see full size screenshot)

www.youtube.com

100 X 200

08995527852550e50400546c6a194ec3.png

www.myspace.com

100 X 200

f3d30d76257f9a18b23d309ee4a1faa8.png

www.amazon.com

100 X 200

dcef8d6eecab92f531caa181830b77c2.png

www.blogger.com

90 X 100

4a722204b38d7a13d681091af664cdd0.png

www.msn.com

100 X 150

a2716e7adb638f99743f02348f137285.png

www.yahoo.com

90 X 120

ec4657c27e4b576d523f2319a5f8b10a.png

www.about.com

100 X 150

4cf9bffeaa2748a81c4d65cd4a6bb110.png

www.ebay.com

100 X 110

9afdb945d45eeed056ada614e5cc1021.png

FAQ

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值