SaveIFD example for C++ Builder
void __fastcall TForm1::SaveIFDClick(TObject *Sender)
{
// This example will add 100 pages to a file faster by continuously using the IFD of the last page
int Page;
int nRet;
// Save page 1, to make sure the file exists
nRet = LEADImage1->Save ("test.tif", FILE_TIF, 0, 0, SAVE_APPEND);
for (Page = 2; Page <= 100 ;Page ++)
{
// get the IFD of the last page
nRet = LEADImage1->GetFileInfo ("test.tif", 0);
LEADImage1->SaveIFD = LEADImage1->InfoIFD;
nRet = LEADImage1->Save ("test.tif", FILE_TIF, 0, 0, SAVE_APPEND);
}
// reset the SaveIFD property so the other Save calls will work properly
LEADImage1->SaveIFD = 0;
}