C# get thumbnail from file via windows api

Ran across this today — it’s a few months old, but it got the job done for me (on Win7, extracting thumbnails on MPEG-4 files):

Code:

ShellFile shellFile = ShellFile.FromFilePath(pathToYourFile);
Bitmap shellThumb = shellFile.Thumbnail.ExtraLargeBitmap;

Hope it helps!

Leave a Comment