Jump to content

Read Thumb.db


Recommended Posts

does anyone have any information on reading the Thumb.db files that are commonly found in folders with photos? I am looking to capture the image and display it. muttley

At last, after two thousand years of research, the illudium Q-36 explosive space modulator.Well, back to the old drawing board.

Link to comment
Share on other sites

Why would you want to display the pictures from it?? The file doesn't get cleaned when pictures are removed so you will see everything that has been in the folder since it was created, is that what you want??

Link to comment
Share on other sites

I am looking to get the thumbnail images from files that are not images them self, such as AutoCAD file (.dwg) or Solidwork files (.sldprt;.sldasm;.slddrw), but I have yet to see a successful way of getting the thumbnail information out of the files (I believe is stored in the meta data). so I am trying to see if there is another way I can get it.

At last, after two thousand years of research, the illudium Q-36 explosive space modulator.Well, back to the old drawing board.

Link to comment
Share on other sites

I am looking to get the thumbnail images from files that are not images them self, such as AutoCAD file (.dwg) or Solidwork files (.sldprt;.sldasm;.slddrw), but I have yet to see a successful way of getting the thumbnail information out of the files (I believe is stored in the meta data). so I am trying to see if there is another way I can get it.

That won't solve the problem of Thumb.db still containing information for non-existent files. That is files which have been deleted or moved. The info for those files still persists in Thumb.db unless you have deleted and rebuilt Thumb.db

You are probably better off to convert the file list to an array (_FileListToArray()) and then get the meta data of those files to find what you want.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Okay, maybe I should explain it fully. I have made a database and UI for it. I am looking to be able to read and display the thumbnail images of non-standard image files when a user searches for a given part number, which to my understanding can be found in the thumb.db file or in the meta date of the said file. I have yet to find a way to get and or display the thumbnail, any help on this would be great.

Edited by Marshin

At last, after two thousand years of research, the illudium Q-36 explosive space modulator.Well, back to the old drawing board.

Link to comment
Share on other sites

Thank you. that does look like it will work well. muttley

Look like I need to do some reading.

At last, after two thousand years of research, the illudium Q-36 explosive space modulator.Well, back to the old drawing board.

Link to comment
Share on other sites

  • 4 weeks later...

I'm thinking instead of parsing the thumbs.db you could manually trigger the generation of a thumbnail through the shell interface:

IThumbnailCapture

IThumbnailCache

How can you call Shell Interfaces and Methods from AutoIt? I was trying to use a method from the IKnownFolderManager interface, but you can't call the methods like dll functions with DllCall(). I'm afraid this is a little past my experience at the moment.
Link to comment
Share on other sites

Hi, GDI+ has an easy thumbnail generator, it returns a handle to an thumbnail image which you can use on your gui/ctrl/imagelist/savetofile.. whatever suites your needs..

Here's the really rough use of it, sorry I don't have the patient to make it pretty and safe atm...

; First link is to the GDI+ Class Image functions, this how I work out what the params are.
; http://msdn.microsoft.com/en-us/library/ms535394(VS.85).aspx
; Second Link is the GDI+ Flat Image functions, this how how I translated the call.
; http://msdn.microsoft.com/en-us/library/ms534041(VS.85).aspx
#include <GDIPlus.au3>

_GDIPlus_Startup()

; Load the image you want a thumbnail of ...
$hImage = _GDIPlus_ImageLoadFromFile(@WindowsDir & "\Web\Wallpaper\Ascent.jpg")

; pass $hImage to the the dllcall, the 100 and 100 is the Width and Height you want the thumbnail..
; if you use 0 and 0 for width and height then the thumbnail is generated at the default system size.
$aResult = DllCall($ghGDIPDll, "int", "GdipGetImageThumbnail", "hwnd", $hImage, "int", 100, "int", 100, "int*", 0, "ptr", 0, "ptr", 0) 

; I'm just saving as jpg, but you can use the thumbnail image handle any way you like. 
_GDIPlus_ImageSaveToFile($aResult[4], @ScriptDir & "\TestThumbnail.jpg")

; Clean up
_GDIPlus_ImageDispose($aResult[4])
_GDIPlus_ImageDispose($hImage)

_GDIPlus_Shutdown()

Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...