ShowJPEGWebTunerDlg example for Delphi

procedure TForm1.ShowJPEGWebTunerDlg1Click(Sender: TObject); 
var
   nRet: L_INT; 
begin
   LEADDlgWeb1.DlgFlags:= DLG_JPEGWEBTUNER_SHOW_INFORMATION Or
                          DLG_JPEGWEBTUNER_SHOW_PREVIEW Or
                          DLG_JPEGWEBTUNER_SHOW_TOOL_ZOOMLEVEL Or
                          DLG_JPEGWEBTUNER_SHOW_SAVETHUMBNAIL Or
                          DLG_JPEGWEBTUNER_SHOW_OPTIONS Or
                          DLG_JPEGWEBTUNER_SHOW_SAVETHUMBNAIL; 

   LEADDlgWeb1.LEADImage:= LEADImage1; 

   nRet:= LEADDlgWeb1.ShowJPEGWebTunerDlg ( Self ); 
   if ( nRet = SUCCESS_DLG_OK  ) then
   begin
      if ( LEADDlgWeb1.Progressive ) then
         LEADImage1.ProgressivePasses:= 1; 

      if ( LEADDlgWeb1.WithStamp ) then
      begin
         LEADImage1.SaveWithStamp ( 'c:\temp\output.jpg', 
                                    LEADDlgWeb1.Format
                                    24, 
                                    LEADDlgWeb1.Quality
                                    32, 
                                    32, 
                                    24 ); 
      end
      else
      begin
         LEADImage1.Save ( 'c:\temp\output.jpg', 
                           LEADDlgWeb1.Format
                           24, 
                           LEADDlgWeb1.Quality
                           SAVE_OVERWRITE ); 
      end; 
   end; 
end;