Duilio Juan Isola
Duilio Juan Isola

Reputation: 237

Get Thumbnails from any file even ones that are not in the thumbs.db

I need to extract Thumbnails from files in a Folder. I tried with this example but it doesn´t always work. It gives me thumbnails of images and PDF files, but not of Word, Excel, Text, OpenOffice, etc. files.

Edit: What I mean with "It doesn't work" is "It doesn't return the image I expect. It returns the icon of the application used to open the file.

Edit 2: Windows Explorer does show me thumbnails of the files I mention "not working" (.xls, .doc, , .ppt, .odt, .ods)

Upvotes: 5

Views: 2686

Answers (2)

David Heffernan
David Heffernan

Reputation: 613053

I think you are mistaken. Not all .doc and .xls files are saved with thumbnails. Certainly .txt files are not saved with thumbnails.

I downloaded the demo code and tried it out. It successfully shows thumbnails for .doc and .xls that showed thumbnails in Explorer. It shows standard icons for those files that do not have thumbnails when viewed in Explorer.

Upvotes: 2

opc0de
opc0de

Reputation: 11768

Here is a tool witch reads Thumbs.db file extracting images from it i hope it helps (source provided )

https://sites.google.com/site/delphibasics/home/delphibasicsprojectreleases/thumbsdbviewer

I don't know why the code you posted doesn't work properly it should...

Upvotes: 2

Related Questions