如何将文件的缩略图提取到 .NET 中的图像文件中?

发布于 2024-08-19 09:17:14 字数 329 浏览 4 评论 0原文

我正在尝试创建一个用于浏览文件的内容目录程序。我想像 Windows 中的资源管理器那样显示文件的缩略图。如何使用 C#.Net 将 Windows 资源管理器显示的缩略图提取到 System.Drawing.Image 的实例中?

我相当确定我需要使用 this 或与IExtractImage。然而,当涉及到使用 COM、pinvoke、互操作等进行任何操作时,我感到非常迷失。

I'm trying to create a content catalog program that is used to browse files. I want to show the thumbnail of the files like Explorer does in windows. How can I use C#.Net to extract the thumbnail that windows explorer shows into an instance of System.Drawing.Image?

I'm fairly certain I need to use this or something related to IExtractImage. Yet I'm pretty lost when it comes to doing anything with COM, pinvoke, interop etc..

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

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

发布评论

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

评论(1

情栀口红 2024-08-26 09:17:14

看看这个 StackOverflow 问题中接受的答案:
C# 通过 windows api 从文件获取缩略图

您链接的代码vbaccelerator 站点上的 2003 年发布的内容显示了几个内存管理问题。

Have a look at the accepted answer in this StackOverflow question:
C# get thumbnail from file via windows api

The code you linked to at the vbaccelerator site is from 2003 and exhibits several memory management problems.

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