SaveIFD example for Visual Basic
' This example will add 100 pages to a file faster by continuously using the IFD of the last page
Dim RasterIO As New LEADRasterIO
Dim Page As Integer
' Save page 1, to make sure the file exists
RasterIO.Save LEADRasterView1.Raster, "d:\temp\test.tif", FILE_TIF, 1, 0, SAVE_APPEND
For Page = 2 To 100
' get the IFD of the last page
RasterIO.GetFileInfo LEADRasterView1.Raster, "d:\temp\test.tif", 100000, 0
RasterIO.SaveIFD = RasterIO.InfoIFD
RasterIO.Save LEADRasterView1.Raster, _
"d:\temp\test.tif", FILE_TIF, _
1, 0, SAVE_APPEND
Next
' reset the SaveIFD property so the other Save calls will work properly
RasterIO.SaveIFD = 0