ShowGammaAdjustmentDlg example for Delphi
procedure TForm1.ShowGammaAdjustmentDlg1Click(Sender: TObject);
var
nRet: L_INT;
begin
LEADDlgColor1.GammaRedValue:= 50;
LEADDlgColor1.GammaGreenValue:= 50;
LEADDlgColor1.GammaBlueValue:= 50;
LEADDlgColor1.GammaAllChannels:= True;
LEADDlgColor1.DlgFlags:= DLG_GAMMAADJUSTMENT_SHOW_PREVIEW Or
DLG_GAMMAADJUSTMENT_SHOW_TOOL_ZOOMLEVEL;
LEADDlgColor1.LEADImage:= LEADImage1;
LEADDlgColor1.LEADDlgService:= LEADDlgService1;
nRet:= LEADDlgColor1.ShowGammaAdjustmentDlg ( Self );
if ( nRet = SUCCESS_DLG_OK ) then
begin
LEADImage1.GammaCorrect ( LEADDlgColor1.GammaRedValue );
end;
end;