创建网页缩略图的最佳方法是什么?

时间:2021-01-04 20:06:14

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?

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

3 个解决方案

#1


3  

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:

你可以使用Firefox或XULRunner和一些相当简单的XUL来创建缩略图作为PNG dataURL(然后你可以根据需要写入文件)。 Robert O'Callahan在这里有一些很好的信息:

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

#2


2  

I know you said you want the service to be local, but... if you have to be connected to the Internet to take the screenshot, you should equally have access to a web service. It seems like a better move to do this than to open yourself up to cross-platform issues of taking screenshots locally.

我知道你说你希望服务是本地的,但是......如果你必须连接到互联网来截取屏幕截图,你应该同样可以访问网络服务。这样做似乎是一个更好的举措,而不是打开自己在本地截取屏幕截图的跨平台问题。

#3


1  

There are a number of commercial packages that will do what you want. I'm not sure from reading your question if free is a requirement. But here are some applications I've found that are reasonably priced and which do exactly what you want. I have not used them myself, but they have free trial downloads so you can evaluate before you purchase.

有许多商业套餐可以满足您的需求。如果免费是必需的,我不确定阅读你的问题。但是我发现这些应用程序的价格合理且完全符合您的要求。我自己没有使用它们,但它们有免费试用版下载,因此您可以在购买前进行评估。

#1


3  

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:

你可以使用Firefox或XULRunner和一些相当简单的XUL来创建缩略图作为PNG dataURL(然后你可以根据需要写入文件)。 Robert O'Callahan在这里有一些很好的信息:

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

#2


2  

I know you said you want the service to be local, but... if you have to be connected to the Internet to take the screenshot, you should equally have access to a web service. It seems like a better move to do this than to open yourself up to cross-platform issues of taking screenshots locally.

我知道你说你希望服务是本地的,但是......如果你必须连接到互联网来截取屏幕截图,你应该同样可以访问网络服务。这样做似乎是一个更好的举措,而不是打开自己在本地截取屏幕截图的跨平台问题。

#3


1  

There are a number of commercial packages that will do what you want. I'm not sure from reading your question if free is a requirement. But here are some applications I've found that are reasonably priced and which do exactly what you want. I have not used them myself, but they have free trial downloads so you can evaluate before you purchase.

有许多商业套餐可以满足您的需求。如果免费是必需的,我不确定阅读你的问题。但是我发现这些应用程序的价格合理且完全符合您的要求。我自己没有使用它们,但它们有免费试用版下载,因此您可以在购买前进行评估。