SaveLSB example for C++ Builder
LEADRasterIO* pRasterIO= NULL;
LEADRasterProcess* pRasterProc= NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&pRasterProc);
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO);
//This example saves a bitmap compatible with the requirements
//of the TIFF Class F format
//make sure we are using pixels
LEADRasterView1->ScaleMode = 3;
pRasterIO->SaveLSB = True;
pRasterIO->SavePageNumberTag = True;
LEADRasterView1->Raster->BitmapXRes = 204;
LEADRasterView1->Raster->BitmapYRes = 196;
//scale the bitmap (preserving the aspect ratio) to have a width of 1728 pixels
pRasterProc->Size (LEADRasterView1->Raster, 1728,
LEADRasterView1->Raster->BitmapHeight * 1728 /
LEADRasterView1->Raster->BitmapWidth, (ResizeConstants)0);
pRasterIO->Save (LEADRasterView1->Raster, AnsiToOLESTR("d:\\pictures\\lsb.tif"),
FILE_CCITT_GROUP3_1DIM, 1, (QFactorConstants)0, SAVE_OVERWRITE);
pRasterIO-> Release( );
pRasterProc-> Release( );