SaveIFD example for Delphi
// This example will add 100 pages to a file faster by continuously using the IFD of the last page
var
Page: Integer;
RasterIO: LEADRasterIO;
begin
RasterIO:= CreateComObject (CLASS_LEADRasterIO) as LEADRasterIO;
// Save page 1, to make sure the file exists
RasterIO.Save (LEADRasterView1.Raster, 'c:\temp\test.tif', FILE_TIF, 1, 0, SAVE_APPEND);
for Page:= 2 to 100 do
begin
//get the IFD of the last page
RasterIO.GetFileInfo (LEADRasterView1.Raster, 'c:\temp\test.tif', 100000, 0);
RasterIO.SaveIFD:= RasterIO.InfoIFD;
RasterIO.Save (LEADRasterView1.Raster,
'c:\temp\test.tif', FILE_TIF,
1, 0, SAVE_APPEND);
end;
// reset the SaveIFD property so the other Save calls will work properly
RasterIO.SaveIFD := 0;
end;