Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)

like image 454
Duilio Juan Isola Avatar asked Oct 10 '22 08:10

Duilio Juan Isola


2 Answers

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.

like image 180
David Heffernan Avatar answered Oct 15 '22 09:10

David Heffernan


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...

like image 38
opc0de Avatar answered Oct 15 '22 09:10

opc0de