GetMemoryThresholds example for Delphi
{ This example doubles the maximum size for a conventional bitmap }
procedure TForm1.Button1Click(Sender: TObject);
var
nMaxConvSize: L_INT;
begin
{ Get only the max conventional size value }
LEADImage1.GetMemoryThresholds( Nil, @nMaxConvSize, Nil, Nil, Nil );
{ Double the max conventional size value }
LEADImage1.SetMemoryThresholds(0, nMaxConvSize * 2, 0, 0, 0, MEM_MAXCONVSIZE );
end;