捕捉网页截图并获得图像(ASP.NET) [英] Capture screenshot of a webpage and get Image (ASP.NET)
问题描述
我的图像做复杂的HTML操作(拖放放大器;降)。当我做,我需要的页面截图,并获得拍摄的图像将其保存到服务器(虚拟目录)
I'm doing complex html operations on images (drag & drop) and when I'm done, I need to take the screenshot of the page and get the taken image save it on server (virtual dir).
所以,我需要的是
Image img = CaptureURL("www.a.com/b.aspx");
有谁知道一个库,可以帮助我做到这一点的?
Does anyone know of a library that could help me do this?
感谢您
推荐答案
解决方案之一是使用 web浏览器控制和渲染上位图的结果。
One solution is to use the WebBrowser control and render the result on a bitmap.
下面是完整的解决方案,我认为这是简单和快速。
Here is the full solution, I think is simple and fast.
的http://pietschsoft.com/post/2008/07/c-generate-webpage-thumbmail-screenshot-image.aspx
另一种方法是使用 IECapt 这是一个捕获实用工具,可以在服务器上运行,你可以调用它使用的Process.Start您的页面。
Other way is to use the IECapt that is a capture utility that can run on server and you can call it from your pages using the Process.Start.
这里是第二个解决方案。
here is the second solution.
的http://$c$cgod.org/WebApp$c$cGod/Screenshot-of-Webpage-with-ASP-NET-AID398.aspx
还有就是 JavaScript的方式,您的用户呈现在客户端的页面和发送你的形象。看一些例子在这里: http://hertzen.com/experiments/jsfeedback/ 和源code是在这里: http://html2canvas.hertzen.com/
And there is the javascript way, that your user render the page on the client side and send you the image. See some examples here : http://hertzen.com/experiments/jsfeedback/ and the source code is here: http://html2canvas.hertzen.com/
希望这有助于
这篇关于捕捉网页截图并获得图像(ASP.NET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!