SaveLSB example for C++ 5.0 and later

// This example saves a bitmap compatible with the requirements
//    of the TIFF Class F format
// make sure we are using pixels
ILEADRasterIO *pRasterIO=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
                 IID_ILEADRasterIO, (void**)&pRasterIO);
ILEADRasterProcess *pRasterProc=NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL,
                 IID_ILEADRasterProcess, (void**)&pRasterProc);
m_LEADRasterView1.SetScaleMode(3);
pRasterIO->PutSaveLSB(TRUE);
pRasterIO->PutSavePageNumberTag(TRUE);
m_LEADRasterView1.GetRaster().SetBitmapXRes(204);
m_LEADRasterView1.GetRaster().SetBitmapYRes(196);
// scale the bitmap (preserving the aspect ratio) to have
// a width of 1728 pixels
pRasterProc->Size(m_LEADRasterView1.GetRaster(),
                  1728.0f,
                  m_LEADRasterView1.GetRaster().GetBitmapHeight() * 1728
                  / m_LEADRasterView1.GetRaster().GetBitmapWidth(),
                  (ResizeConstants)0);
pRasterIO->Save(m_LEADRasterView1.GetRaster(),
                "d:\\temp\\lsb.tif",
                FILE_CCITT_GROUP3_1DIM,
                1, (QFactorConstants)0, SAVE_OVERWRITE);
pRasterIO->Release();
pRasterProc->Release();