ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.Thumbnail.TJamThumbnailExtractor.SaveThumbnailToJPEG

Use SaveThumbnailToJPEG to save a thumbnail image as jpeg-file.

Syntax
Pascal
class procedure SaveThumbnailToJPEG(const SourceFilename: Unicodestring; const ThumbnailFilename: Unicodestring; Width: Longint = 100; Height: LongInt = 100; Quality: LongInt = 80);
Parameters 
Description 
const SourceFilename: Unicodestring 
The source file name.  
const ThumbnailFilename: Unicodestring 
The destination file name.  
Width: Longint = 100 
The width of the saved thumbnail.  
Height: LongInt = 100 
The height of the saved thumbnail.  
Quality: LongInt = 80 
The higher the Quality value (up to a maximum of 100), the better the image quality, but the larger the file size.  

This method gives the possibility to save thumbnail images as jpeg-file. It is possible to set the size of the picture with the parameters Width and Height. Use Compression to set the compression quality of the JPEG image when writing out a jpeg image. Higher compression results in a poorer picture quality, but a smaller file size. The higher the Quality value (up to a maximum of 100), the better the image quality, but the larger the file size. The lower the Quality value (to a minimum of 1), the smaller the resulting file size, but at the expense of picture quality.

Exceptions 
Description 
If the given file cannot be found. 

This example saves a thumbnail image as jpeg-file with a size of 150*150 pixel and a quality value of 50.

TJamThumbnailExtractor.SaveThumbnailToJPEG(JamThumbnailImage.Path, 'C:tempmyimage.jpg', 150, 150, 50);