SaveInterlaced example for C++ 5.0 and later
This example saves the current image as an interlaced GIF file, then loads the saved image with a paint-while-load effect that shows the interlaced behavior.
ILEADRasterIO *pRasterIO=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
IID_ILEADRasterIO, (void**)&pRasterIO);
//Save the current image as an interlaced GIF file.
pRasterIO->PutSaveInterlaced(TRUE);
pRasterIO->Save(m_LEADRasterView1.GetRaster(),
"d:\\temp\\tmp.gif", FILE_GIF,
8, (QFactorConstants)1, SAVE_OVERWRITE);
//Clear the bitmap so that we can see the paint-while-load effect.
m_LEADRasterView1.GetRaster().SetBitmap(0);
//Paint the image while loading, showing that it is interlaced.
m_LEADRasterView1.SetPaintWhileLoad(TRUE);
pRasterIO->Load(m_LEADRasterView1.GetRaster(),
"d:\\temp\\tmp.gif", 0, 0, 1);
pRasterIO->Release();