|
-
Sep 1st, 2012, 04:49 AM
#1
Thread Starter
Fanatic Member
[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
-
Sep 1st, 2012, 03:39 PM
#2
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
-
Sep 1st, 2012, 11:11 PM
#3
Thread Starter
Fanatic Member
Re: Thumbnail from a video file
 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.
-
Sep 2nd, 2012, 07:57 AM
#4
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.
-
Sep 2nd, 2012, 10:12 AM
#5
Thread Starter
Fanatic Member
Re: Thumbnail from a video file
Thanks a lot for your help dunfiddlin. The code works.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|