创建网页缩略图的最佳方法是什么? [英] What is the best way to create a web page thumbnail?

查看:87
本文介绍了创建网页缩略图的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一些合理的跨平台方式来创建给定URL的缩略图?我知道有缩略图Web服务可以做到这一点,但我想要一个可以在本地执行此操作的软件或库。我想在Linux中我总是可以使用无头X服务器生成浏览器窗口,但是Windows或OS X呢?

Is there some reasonably cross platform way to create a thumbnail image given a URL? I know there are thumbnail web services that will do this, but I want a piece of software or library that will do this locally. I guess in Linux I could always spawn a browser window using a headless X server, but what about Windows or OS X?

推荐答案

您可以将Firefox或XULRunner与一些相当简单的XUL一起使用来创建缩略图作为PNG dataURL(如果需要,您可以将其写入文件)。 Robert O'Callahan在这里有一些很好的信息:

You can use Firefox or XULRunner with some fairly simple XUL to create thumbnails as PNG dataURLs (that you could then write to file if needed). Robert O'Callahan has some excellent information on it here:

http://weblogs.mozillazine.org/roc/archives/2005/05/rendering_web_p.html

这篇关于创建网页缩略图的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆