ProgressivePasses Example for C++ 4.0 and later

This example shows how to save and load a progressive file.

// Save the current image as a progressive CMP file.
m_Lead1.SetProgressivePasses(8);
m_Lead1.Save("c:\\lead\\images\\tmp.cmp", FILE_CMP, 24, QFACTOR_PQ2, SAVE_OVERWRITE);

// Set properties to show progressive paints when we load.
m_Lead1.SetPaintWhileLoad(TRUE);
m_Lead1.SetAutoSetRects(FALSE);

// Load the file we just saved.
m_Lead1.SetProgressivePasses(PROGRESSIVEPASSES_WHEN_MEANINGFUL);
m_Lead1.Load("c:\\lead\\images\\tmp.cmp", 0, 0, 1);

// Restore the default behavior.
m_Lead1.SetProgressivePasses(0);