ShowInvertedTextDlg example for Delphi

procedure TForm1.ShowInvertedTextDlg1Click(Sender: TObject); 
begin

   LEADDlgImgDoc1.MinInvertWidth:= 900; 
   LEADDlgImgDoc1.MinInvertHeight:= 56; 
   LEADDlgImgDoc1.MinBlackPercent:= 75; 
   LEADDlgImgDoc1.MaxBlackPercent:= 95; 
   LEADDlgImgDoc1.WhiteAreaColor:= RGB ( 255, 0, 0 ); 
   LEADDlgImgDoc1.BlackAreaColor:= RGB ( 0, 0, 255 ); 

   LEADDlgImgDoc1.ProcessFlags:= INVERTEDTEXT_USE_DIAGONALS Or INVERTEDTEXT_USE_DPI; 
   LEADDlgImgDoc1.DlgFlags:= DLG_INVERTEDTEXT_AUTOPROCESS Or
                             DLG_INVERTEDTEXT_SHOW_PREVIEW Or
                             DLG_INVERTEDTEXT_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgImgDoc1.LEADImage:= LEADImage1; 
   LEADDlgImgDoc1.ShowInvertedTextDlg ( Self ); 
end;