ShowPNGWebTunerDlg example for Delphi

procedure TForm1.ShowPNGWebTunerDlg1Click(Sender: TObject); 
var
   nRet: L_INT; 
begin

   LEADDlgWeb1.TransparentColor:= RGB ( 255, 255, 255 ); 
   LEADDlgWeb1.PaletteType:= CRF_FIXEDPALETTE; 
   LEADDlgWeb1.AddWindowsColors:= True; 
   LEADDlgWeb1.DitherType:= CRF_FLOYDSTEINDITHERING; 
   LEADDlgWeb1.BitsPerPixel:= 8; 
   LEADDlgWeb1.NumOfColors:= 256; 
   LEADDlgWeb1.TransparencyTolerance:= 25; 
   LEADDlgWeb1.Transparent:= True; 

   LEADDlgWeb1.DlgFlags:= DLG_PNGWEBTUNER_SHOW_INFORMATION Or
                          DLG_PNGWEBTUNER_SHOW_PREVIEW Or
                          DLG_PNGWEBTUNER_SHOW_TOOL_ZOOMLEVEL Or
                          DLG_PNGWEBTUNER_SHOW_TOOL_COLORPICKER Or
                          DLG_PNGWEBTUNER_SHOW_TRANSPARENCY Or
                          DLG_PNGWEBTUNER_SHOW_ADDWINDOWCOLOR; 

   LEADDlgWeb1.LEADImage:= LEADImage1; 
   LEADDlgWeb1.LEADDlgService:= LEADDlgService1; 
   LEADDlgWeb1.EnableMethodErrors:= False; 
   LEADDlgWeb1.ShowHelpButton:= True; 

   nRet:= LEADDlgWeb1.ShowPNGWebTunerDlg ( Self ); 
   if ( nRet = SUCCESS_DLG_OK  ) then
   begin
      LEADImage1.ColorRes ( LEADDlgWeb1.BitsPerPixel
                            LEADDlgWeb1.PaletteType
                            LEADDlgWeb1.DitherType
                            0 ); 
   end; 
end; 

procedure TForm1.LEADDlgWeb1DlgHelp (uDialogID: Cardinal); 
begin
   Case ( uDialogID ) of
      DLG_HELP_PNGWEBTUNER: 
         ShowMessage( 'Help from PNG Web Tuner dialog' ); 

      DLG_HELP_GIFWEBTUNER: 
         ShowMessage( 'Help from GIF Web Tuner dialog' ); 

      DLG_HELP_JPEGWEBTUNER: 
         ShowMessage( 'Help from JPEG Web Tuner dialog' ); 

      DLG_HELP_HTMLMAPPER: 
         ShowMessage( 'Help from HTMLMapper dialog' ); 
   end; 
end;