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.

{Save the current image as an interlaced GIF file.}
Lead1.SaveInterlaced := True;
Lead1.Save ('d:\temp\tmp.gif', FILE_GIF, 8, 1, SAVE_OVERWRITE);

{Clear the bitmap so that we can see the paint-while-load effect.}
Lead1.Bitmap := 0;

{Paint the image while loading, showing that it is interlaced.}
Lead1.PaintWhileLoad := True;
Lead1.Load ('d:\temp\tmp.gif', 0, 0, 1);