ImageEn, unit imageenio

TImageEnIO.LoadThumbnailFromExplorer

TImageEnIO.LoadThumbnailFromExplorer


Declaration

function LoadThumbnailFromExplorer(const FileName : WideString; LoadWidth : Integer = 120; LoadHeight : Integer = 120; ThumbnailOptions: TIEExplorerThumbOptions = []): Boolean;


Description

Retrieve the thumbnail for the specified file from Windows Explorer. This should work for any format that displays a thumbnail in Windows Explorer, including images and videos.
Use LoadWidth and LoadHeight to specify the size of the thumbnail that you require. Windows can be inconsistent with sizes smaller than 98x98 pixels (image may be returned upside down), so it is not recommended to use sizes smaller than 98x98.
ThumbnailOptions allows you to specify additional customization options for the thumbnail.
Result will be false (and the Aborting property will be true) if loading fails (e.g. if there is not a thumbnail for this file type).


Example

// Load a thumbnail for a video
if ImageEnView1.IO.LoadThumbnailFromExplorer('D:\MyVideo.wmv') = False then
  ShowMessage('Load Error!');