ShowStitchDlg example for Delphi

procedure TForm1.ShowStitchDlg1Click(Sender: TObject); 
var
   i: L_INT; 
   nRet: L_INT; 
   FileNames: Array [ 0..2 ] of String; 
begin
   LEADDlgImgEffect1.ItemsCount:= 3; 
   FileNames[0]:= 'e:\image1.jpg'; 
   FileNames[1]:= 'e:\image2.jpg'; 
   FileNames[2]:= 'e:\image3.jpg'; 

   for i:= 0 to 2 do
   begin
      LEADImage2.LoadStamp ( FileNames[i] ); 
      LEADDlgImgEffect1.ItemDescription [i]:= IntToStr(i); 
      LEADDlgImgEffect1.ItemFileName [i]:= FileNames[i]; 
      LEADDlgImgEffect1.ItemBitmap [i]:= LEADImage2.Bitmap; 
   end; 

   LEADDlgImgEffect1.BitmapWidth:= 320; 
   LEADDlgImgEffect1.BitmapHeight:= 200; 
   LEADDlgImgEffect1.BitmapBitsPerPixel:= 24; 
   LEADDlgImgEffect1.Resolution:= 72; 
   LEADDlgImgEffect1.BackgroundColor:= RGB ( 255, 255, 255 ); 
   LEADDlgImgEffect1.WindowIcon.LoadFromFile ( 'MyIcon.ico' ); 
   LEADDlgImgEffect1.CommandShow:= SW_SHOW; 

   nRet:= LEADDlgImgEffect1.ShowStitchDlg ( Self ); 
   if ( nRet = SUCCESS_DLG_EXPORTANDEXIT ) then
   begin
      LEADImage1.Bitmap:= LEADDlgImgEffect1.StitchBitmap
   end; 
end;