ProgressivePasses example for Delphi
This example shows how to save and load a progressive file.
procedure TForm1.Button10Click(Sender: TObject);
begin
{ Save the current image as a progressive CMP file. }
Lead1.ProgressivePasses := 8;
Lead1.Save('c:\lead\images\TMP.cmp', FILE_CMP, 24, PQ2, SAVE_OVERWRITE);
{ Set properties to show progressive paints when we load. }
Lead1.PaintWhileLoad := True;
Lead1.AutoSetRects := False;
{ Load the file we just saved. }
Lead1.ProgressivePasses := PROGRESSIVEPASSES_WHEN_MEANINGFUL;
Lead1.Load('c:\lead\images\TMP.cmp', 0, 0, 1);
{ Restore the default behavior. }
Lead1.ProgressivePasses := 0;
end;