ProgressivePasses Example for Delphi

This example shows how to save and load a progressive file.

var
   RasterIO: LEADRasterIO;
begin
   RasterIO:= CreateComObject(CLASS_LEADRasterIO) as LEADRasterIO;
   //Save the current image as a progressive JPEG file.
   RasterIO.ProgressivePasses:= 8;
   RasterIO.Save (LEADRasterView1.Raster, 'c:\temp\TMP.jpg',
                                      FILE_JFIF, 24,
                                      200, SAVE_OVERWRITE);
   //Set properties to show progressive paints when we load.
   LEADRasterView1.PaintWhileLoad:= True;
   //Load the file we just saved.
   RasterIO.ProgressivePasses:= PROGRESSIVEPASSES_WHEN_MEANINGFUL;
   RasterIO.Load (LEADRasterView1.Raster, 'c:\temp\TMP.jpg', 0, 0, 1);
end;