Results 1 to 5 of 5

Thread: [RESOLVED] Thumbnail from a video file

  1. #1
    Hyperactive Member
    Join Date
    Feb 04
    Location
    India
    Posts
    343

    Resolved [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

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 12
    Posts
    5,489

    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:
    1. Using shFile = Microsoft.WindowsAPICodePack.Shell.ShellFile.FromFilePath(filepath) 'extracts detailed fileinfo including the Explorer thumbnail image
    2.             PictureBox1.Image = shFile.Thumbnail.MediumBitmap 'other options including small, large and original or draw manually for custom size
    3. End Using

  3. #3
    Hyperactive Member
    Join Date
    Feb 04
    Location
    India
    Posts
    343

    Question Re: Thumbnail from a video file

    Quote Originally Posted by dunfiddlin View Post
    http://archive.msdn.microsoft.com/WindowsAPICodePack

    Add Reference to shell.dll which comes in the above download.

    vb.net Code:
    1. Using shFile = Microsoft.WindowsAPICodePack.Shell.ShellFile.FromFilePath(filepath) 'extracts detailed fileinfo including the Explorer thumbnail image
    2.             PictureBox1.Image = shFile.Thumbnail.MediumBitmap 'other options including small, large and original or draw manually for custom size
    3. 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.

  4. #4
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 12
    Posts
    5,489

    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.

  5. #5
    Hyperactive Member
    Join Date
    Feb 04
    Location
    India
    Posts
    343

    Resolved 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
  •