Save example for Delphi

This example saves the image as a BMP file, loads the new file, and redisplays the bitmap.

var
   RasterIO: LEADRasterIO;
   sRet: Smallint;
begin
   RasterIO:= CreateComObject (CLASS_LEADRasterIO) as LEADRasterIO;

   Screen.Cursor:= crHourglass;
   RasterIO.Save (LEADRasterView1.Raster, 'c:\temp\tmp.bmp',
              FILE_BMP, 8, 1, SAVE_OVERWRITE);
   RasterIO.Load (LEADRasterView1.Raster, 'c:\temp\tmp.bmp', 0, 0, 1);
   LEADRasterView1.ForceRepaint (sRet);
   Screen.Cursor:= crDefault;
end;