【问题标题】:Is there any C++ lib to read thumbnails from thumb.db in Windows Folder?是否有任何 C++ 库可以从 Windows 文件夹中的 thumb.db 读取缩略图?
【发布时间】:2010-09-18 16:52:38
【问题描述】:

我想在 Windows XP 中读取包含图像的文件夹中的所有缩略图。 但是如果我读取图像文件来获取缩略图,它似乎有点慢,所以我希望我可以先读取 windows 图像缩略图缓存:thumb.db。 c++ 或 c 中是否有任何库可以从 thumb.db 读取缩略图。

【问题讨论】:

  • 很抱歉,thumbs.db 似乎没有为每个 ADS 存储图像 1 个缩略图。直到现在我都确信它确实是我在某处读到的。

标签: c++ windows image


【解决方案1】:

Thumbs.db 文件以 OLE Compound Document 格式存储,与许多 Microsoft Office 产品使用的格式相同。

您也可以尝试查看ThumbsDBLib。它在 C# 中,但您可能会看到他们如何读取数据并将其转换为 C++。

注意:Windows Vista 和更高版本不使用 Thumbs.db。有关 Vista 及更高版本,请参阅 IThumbnailCache interface

对于 Vista 及更高版本,它们存储在此处:%homedrive%\Users\%username%\AppData\Local\Microsoft\Windows\Explorer

【讨论】:

  • 谢谢布赖恩!我将 c#code 转换为 c++,它可以工作!顺便说一句,我的英文名字也是 Brian _
【解决方案2】:

您可能会发现这很有用:

C++ 中的ThumbsDBLib

http://www.windameister.org/blog/index.php/thumbslib-in-cpp

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-08-25
    • 1970-01-01
    • 2010-09-18
    • 2012-01-18
    • 1970-01-01
    • 2018-10-28
    • 2023-03-09
    • 1970-01-01
    相关资源
    最近更新 更多