ImageEn, unit iexShellThumbnails |
|
WindowsGetExplorerThumbnail
Declaration
function WindowsGetExplorerThumbnail(const Filename: WideString; Bitmap: TBitmap; iWidth: Integer = 120; iHeight: Integer = 120; AlphaMethod: Boolean = True; ThumbFlags: Integer = -1; AlphaFlip: Boolean = True): Boolean; overload;
function WindowsGetExplorerThumbnail(const Filename: WideString; IEBitmap: TIEBitmap; iWidth: Integer = 120; iHeight: Integer = 120; AlphaMethod: Boolean = True; ThumbFlags: Integer = -1; AlphaFlip: Boolean = True): Boolean; overload;
Description
Returns the thumbnail from Windows Explorer for the specified file, which can be an image or a video file.
If
AlphaMethod is true, a 32bit assignment is used. If False, a legacy assignment is used. Generally this should be true.
ThumbFlags specifies additional options for thumbnail customization. See
IShellItemImageFactory GetImage Flags. If unspecified, SIIGBF_BIGGERSIZEOK will be used.
If a non-standard size is used (i.e. NOT 16x16, 32x32, 48x48 or 96x96), Windows tends to return a bottom-up bitmap. This is automatically corrected if
AutoFlip is true. However, for safety, it best to avoid sizes smaller than 98x98 which may give inconistent results.
Result is false if no thumbnail is available for the file.
// Return a thumbnail for a video
WindowsGetFileIcon( 'C:\MyVideo.mpeg', ImageEnView1.IEBitmap, 256, 256 );
ImageEnView1.Update();
See Also
◼LoadThumbnailFromExplorer
◼WindowsGetFileIcon
◼WindowsGetStockIcon