Search code examples
imagepngimage-resizingwindows-explorer

Capture Windows Explorer Thumbnails as Images - Save as PNG Files


I have a whole bunch of images in a directory on a Windows machine and I need to save a version of each photo as a thumbnail for another application. Most of these images are large, (600 x 600 at least), so I was thinking I was going to have to open each in Photoshop and resize and then save as the smaller version.

But then I realized that the size that Windows explorer uses as the Large Icon view is exactly what I need. If only I could quickly just save all these thumbnails stright out of Windows as copies of the photos but the exact size they appear in the explorer window... If only...

Alternatively, I've seen batch image resizers (and I will most likely use one if this doesn't work) but what is the best way to accomplish what I'm going for here? Is it possible to pull from Windows somehow?


Solution

  • On Vista or above, you can use IShellItemImageFactory to retrieve the thumbnail either from the shell cache or generate one if necessary. For XP and earlier, you can call IExtractImage.