Available in the LEADTOOLS Imaging toolkit. |
SaveLayers example for C++ 4.0 and later
int i;
// Save all the extra bitmaps in the bitmap list as layers
m_Lead1.SetSaveLayers(TRUE);
for(i = 1; i < m_Lead1.GetBitmapListCount(); i++)
{
// reset the layer info so all the layers are saved from 0,0 offset
m_Lead1.SetLayerLeft(i, 0);
m_Lead1.SetLayerTop(i, 0);
m_Lead1.SetLayerBlendModeKey(i, "dark");
m_Lead1.SetLayerClipping(i, 0);
m_Lead1.SetLayerOpacity(i, 40);
m_Lead1.SetLayerMaskBitmap(i, NULL);
}
m_Lead1.Save("c:\\temp\\layers.psd", FILE_PSD, 0, 0, SAVE_OVERWRITE);