SaveInterlaced example for Delphi
//This example saves the current image as an interlaced GIF file, then loads the saved //image with a paint-while-load effect that shows the interlaced behavior.
var
szFile: String;
MyRasterIO: LEADRasterIO;
begin
MyRasterIO := CreateComObject (CLASS_LEADRasterIO) as ILEADRasterIO;
szFile:= 'c:\temp\test.gif';
//Save the current image as an interlaced GIF file.
MyRasterIO.SaveInterlaced:= True;
MyRasterIO.Save (LEADRasterView1.Raster, szFile, FILE_GIF, 8, 1, SAVE_OVERWRITE);
//Clear the bitmap so that we can see the paint-while-load effect.
LEADRasterView1.Raster.Bitmap:= 0;
//Paint the image while loading, showing that it is interlaced.
LEADRasterView1.PaintWhileLoad:= True;
MyRasterIO.Load (LEADRasterView1.Raster, szFile, 0, 0, 1);
end;