ProgressivePasses Example for C++ Builder

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

   LEADRasterIO* pRasterIO= NULL;

   CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO);
   //Save the current image as a progressive JPEG file.
   pRasterIO->ProgressivePasses = 8;
   pRasterIO->Save (LEADRasterView1->Raster, AnsiToOLESTR("c:\\temp\\TMP.jpg"),
                                      FILE_JFIF, 24,
                                      (QFactorConstants)200, SAVE_OVERWRITE);
   //Set properties to show progressive paints when we load->
   LEADRasterView1->PaintWhileLoad = True;
   //Load the file we just saved->
   pRasterIO->ProgressivePasses= PROGRESSIVEPASSES_WHEN_MEANINGFUL;
   pRasterIO->Load (LEADRasterView1->Raster, AnsiToOLESTR("c:\\temp\\TMP.jpg"), 0, 0, 1);

   pRasterIO-> Release();