网站截图(HTML5 画布/服务)
好吧,
一直在做一些研究,想知道是否有其他人尝试过这个......以及你会采取什么方法。
我正在计划创建一个网站,该网站将显示网站的屏幕截图(可能基于某人电子邮件地址中的网址)。
会有很多人遇到这种情况,因此预先制作屏幕截图并不是解决方案。
Soooooo...有谁知道任何解决方案:
- 按需构建的缩略图服务(无需排队)?
- HTML5/Canvas 脚本可以让我做到这一点。我找到了一个,但它不能跨站点运行。
- 还有其他解决方案吗?
它将用 PHP 构建。
谢谢
PVS。
Alright all,
Been doing a bit of research and want to know if anyone else has tried this... and what approach would you take.
I'm planning on doing a website which will display a screenshot of a website (maybe based on the url in someones email address).
There's going to be alot of people getting this so, pre-production of the screenshots isn't a solution.
Soooooo... does anyone know of any solutions:
- Thumbnail service that builds on demand (no queuing)?
- HTML5/Canvas script that will let me do this. I've found one but it won't run cross site.
- Any other solution?
It'll be built in PHP.
Thanks
PVS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这个网站 http://html2canvas.hertzen.com/ 是您现在可以获得的关于客户端脚本。它使用元素的计算属性来渲染页面,我必须说它看起来不错!
更新:
这里有一个演示: http://html2canvas.hertzen.com/tests/templates/projection /index.html 。单击可切换“真实”视图与渲染图像。
This site http://html2canvas.hertzen.com/ is the best you will get right now with regard to a client side script. It uses the calculated properties of elements to render a page, and I must say it looks good!
Update:
A demo here: http://html2canvas.hertzen.com/tests/templates/projection/index.html . Click to toggle the 'real' view with the rendered image.
我之前玩过wkhtmltoimage,它非常适合我的用途,但确实需要您安装到您的服务器上
I've played about with wkhtmltoimage before, it was pretty good for what I was using it for, but does require you to install onto your server
为了截取网站的屏幕截图(功能之一),我在很棒的 PhantomJS 之上构建了一个服务,PhantomJS 是一个出色的无头浏览器,它使用 webkit 引擎(与 safari 使用的相同)。尽管它是无头的,但它仍然具有 QT 和虚拟帧缓冲区 (xvfb) 的依赖。希望这有帮助:http://www.phantomjs.org/
For taking screenshots of websites (one of the features) i built a service ontop of the awesome PhantomJS which is an excellent headless browser which uses the webkit engine (same that safari uses). Although it's headless, it still has deps in QT and a virtual framebuffer (xvfb). Hope this helps: http://www.phantomjs.org/
您可以使用 html2canvas。更多信息此处。
You can use html2canvas. More information here.