SaveWithStamp example for C++ 5.0 and later
This example saves the image in a JPEG file that includes a thumbnail (stamp) image. It then loads the thumbnail from the new file.
ILEADRasterIO *pRasterIO=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
IID_ILEADRasterIO, (void**)&pRasterIO);
int SavedMode = m_LEADRasterView1.GetScaleMode();
m_LEADRasterView1.SetScaleMode(3); // Use pixels for sizing the thumbnail
pRasterIO->SaveWithStamp(m_LEADRasterView1.GetRaster(),
"d:\\temp\\stamp.jpg", FILE_JFIF,
24, (QFactorConstants)30, 150.0f, 100.0f, 24);
m_LEADRasterView1.SetScaleMode(SavedMode);
pRasterIO->LoadStamp(m_LEADRasterView1.GetRaster(),
"d:\\temp\\stamp.jpg");
m_LEADRasterView1.ForceRepaint();
pRasterIO->Release();