ProgressivePasses example for C++ Builder
This example shows how to save and load a progressive file.
void __fastcall TForm1::Button8Click(TObject *Sender)
{
// Save the current image as a progressive CMP file.
Lead1->ProgressivePasses = 8;
Lead1->Save("c:\\lead\\images\\TMP.cmp", FILE_CMP, 24, PQ2, SAVE_OVERWRITE);
// Set properties to show progressive paints when we load.
Lead1->PaintWhileLoad = True;
Lead1->AutoSetRects = False;
// Load the file we just saved.
Lead1->ProgressivePasses = PROGRESSIVEPASSES_WHEN_MEANINGFUL;
Lead1->Load("c:\\lead\\images\\TMP.cmp", 0, 0, 1);
// Restore the default behavior.
Lead1->ProgressivePasses = 0;
}