Corel Photo Paint (.cpt) thumbnail

ALX

Well-known member
Joined
Nov 16, 2005
Messages
253
Location
Columbia, SC
Programming Experience
10+
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 ???
 
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
 
Back
Top