CreateThumbnailFromFile example for Delphi
Procedure TForm1.Button1Click (Sender: TObject);
begin
LEADThumb1.LoadStamp:= False;
LEADThumb1.ForceSize:= True;
LEADThumb1.ThumbnailBackgroundColor:= RGB (0, 255, 0 ) ;
LEADThumb1.ThumbnailWidth:= 80;
LEADThumb1.ThumbnailHeight:= 40;
LEADThumb1.CreateThumbnailFromFile ('c:\temp\test.tif', 1);
LEADThumb1.CreateThumbnailFromFile ('c:\temp\test.tif', 2);
LEADThumb1.CreateThumbnailFromFile ('c:\temp\test.tif', 3);
end;
Procedure TForm1.LEADThumb1ThumbnailEvent (Sender: TObject;
Bitmap: TBitmapHandle; FileName: String; nStatusCode, nPercent: Integer);
Begin
if ((nStatusCode = 0) and (nPercent = 0) and (Bitmap <> 0)) then
begin
LEADImage1.Bitmap:= Bitmap;
ShowMessage ('pause');
end;
End;