[RESOLVED] Thumbnail from a video file
Hello Guys,
I am making a program whereby I need to extract thumbnail from video files. Basically program should scan a set of video files and get thumbnails from each of them.
I have no idea how to go about it ? Does .net 3.5 support it through an api or so, or do I manually need to read video file and see if I can extract image.
Will be glad if anyone can help me out.
Thanks a lot,
Cheers,
GR
Re: Thumbnail from a video file
http://archive.msdn.microsoft.com/WindowsAPICodePack
Add Reference to shell.dll which comes in the above download.
vb.net Code:
Using shFile = Microsoft.WindowsAPICodePack.Shell.ShellFile.FromFilePath(filepath) 'extracts detailed fileinfo including the Explorer thumbnail image
PictureBox1.Image = shFile.Thumbnail.MediumBitmap 'other options including small, large and original or draw manually for custom size
End Using
Re: Thumbnail from a video file
Quote:
Originally Posted by
dunfiddlin
http://archive.msdn.microsoft.com/WindowsAPICodePack
Add Reference to shell.dll which comes in the above download.
vb.net Code:
Using shFile = Microsoft.WindowsAPICodePack.Shell.ShellFile.FromFilePath(filepath) 'extracts detailed fileinfo including the Explorer thumbnail image
PictureBox1.Image = shFile.Thumbnail.MediumBitmap 'other options including small, large and original or draw manually for custom size
End Using
Thanks for your help. I have two queries :
Requirements:
Minimum .NET Framework version required to use this library is 3.5 SP1. The APIs for Shell Extensions require .NET 4.
This library targets the Windows 7 RTM version, though many of the features will work on Windows Vista as well.
- I am using VS 2008 (.net framework 3.5 sp1). So it seems getting thumbnail images may not work. Do I need to shift to VS 2010 for this?
- Once compiled will my program work in Windows XP.
Re: Thumbnail from a video file
This is Shell not Shell Extensions, so 3.5 should be fine. XP, I think not, (although stranger things have happened!) I haven't had a running XP for a very long time so I'm afraid I can't help with that.
Re: Thumbnail from a video file
Thanks a lot for your help dunfiddlin. The code works. :)