从 url 创建缩略图,如 asp.net/C# 中的 Digg

发布于 2024-08-27 18:09:32 字数 207 浏览 6 评论 0原文

如何从 URL 创建缩略图?

例如:

  • 就像在 Digg 上一样,当我提交链接时,Digg 会从该 URL 上的任何图像中选择缩略图。
  • 或者像 Facebook 一样,当我提交链接时,我可以选择该链接的缩略图。

那么,我如何使用 ASP.Net/C# 来做到这一点。我只想创建一个缩略图(不是网页的屏幕截图)。

How I can create a thumbnail from a URL?

For example:

  • Like on Digg, when I submit a link, Digg choses a Thumbnail from any images on that URL.
  • Or like Facebook, when I submit a link, I can chose a thumbnail for that link.

So, how I can do that with ASP.Net/C#. I just want to create a thumbnail (not a screenshot of the web page).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

人生戏 2024-09-03 18:09:32

要从网页创建屏幕截图,您需要有一个布局引擎的接口,例如 GeckoWebkit。您可以使用khtml2png来创建网页屏幕截图。

要从网页创建缩略​​图,您必须解析网页的源代码,下载图像链接并将其调整为给定的缩略图大小。

To create a screenshot from a web page you need to have an interface to a layout engine like Gecko or Webkit. You may use khtml2png for creating web page screenshots.

To create thumbnails from the web page you have to parse the web page's source, download the image links and resize them to the given thumbnail size.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文