CreateThumbnailFromFile example for C++ Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADThumb1->LoadStamp= False;
LEADThumb1->ForceSize= True;
LEADThumb1->ThumbnailBackgroundColor= (TColor) 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);
}
void __fastcall TForm1::LEADThumb1ThumbnailEvent(TObject *Sender,
TBitmapHandle Bitmap, AnsiString FileName, int nStatusCode,
int nPercent)
{
if ((nStatusCode == 0) && (nPercent == 0) && (Bitmap != 0))
{
LEADImage1->Bitmap= Bitmap;
ShowMessage ("pause");
}
}