Available in the LEADTOOLS Imaging toolkit. |
SaveIFD example for C++ 4.0 and later
// This example will add 100 pages to a file faster by continuously using the IFD of the last page
int nPage;
// Save page 1, to make sure the file exists
m_Lead1.Save("test.tif", FILE_TIF, 0, 0, SAVE_APPEND);
for(nPage = 2; nPage <= 100; nPage++)
{
// get the IFD of the last page
m_Lead1.GetFileInfo("test.tif", 100000, 0);
m_Lead1.SetSaveIFD(m_Lead1.GetInfoIFD());
m_Lead1.Save("test.tif", FILE_TIF, 0, 0, SAVE_APPEND);
}
// reset the SaveIFD property so the other Save calls will work properly
m_Lead1.SetSaveIFD(0);