Available in the LEADTOOLS Imaging toolkit. |
SaveLSB example for C++ 4.0 and later
// This example saves a bitmap compatible with the requirements
// of the TIFF Class F format
// make sure we are using pixels
m_LEAD1.SetScaleMode(3);
m_LEAD1.SetSaveLSB(TRUE);
m_LEAD1.SetSavePageNumberTag(TRUE);
m_LEAD1.SetBitmapXRes(204);
m_LEAD1.SetBitmapYRes(196);
// scale the bitmap (preserving the aspect ratio) to have
// a width of 1728 pixels
m_LEAD1.Size(1728.0f,
m_LEAD1.GetBitmapHeight() * 1728 / m_LEAD1.GetBitmapWidth(),
0);
m_LEAD1.Save("d:\\temp\\lsb.tif",
FILE_CCITT_GROUP3_1DIM,
1, 0, SAVE_OVERWRITE);