Results 1 to 3 of 3

Thread: Corel Photo Paint (.cpt) thumbnail

  1. #1
    ALX
    ALX is offline VB.NET Forum Genius
    .NET Framework
    .NET 4.0
    Join Date
    Nov 2005
    Location
    Columbia, SC
    Posts
    187
    Reputation
    143

    Corel Photo Paint (.cpt) thumbnail

    I'm trying to find out the format for .cpt files that are produced with Corel Photo Paint so I can extract a thumbnail bitmap from these files. Windows can do it, as it displays Corel's .cpt files as thumbnail icons in Windows Explorer, so I assume it's not proprietary information. The version I'm working with is Corel Photo Paint 8. Google's no help as it only lists 3rd party software. Anyone have a clue where to look ???

  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    15,078
    Reputation
    2802
    If Explorer can get thumbnail, then you can get thumbnail from that (Shell). An easy way to use it is through Windows Api Code Pack, you need Shell library and Core library which can be downloaded with Nuget or here:
    NuGet Gallery | Windows API Code Pack - Core 1.1.2
    NuGet Gallery | Windows API Code Pack - Shell 1.1.1

    Then it is as simple as using library ShellFile.FromFilePath and ShellFile.Thumbnail:
    'Imports Microsoft.WindowsAPICodePack.Shell
    Dim f = ShellFile.FromFilePath("file path")
    Dim thumb = f.Thumbnail.LargeBitmap

  3. #3
    ALX
    ALX is offline VB.NET Forum Genius
    .NET Framework
    .NET 4.0
    Join Date
    Nov 2005
    Location
    Columbia, SC
    Posts
    187
    Reputation
    143
    Thanks, John. 'Will look into that...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •