Available in the LEADTOOLS Imaging toolkit. |
InfoLayers example for C++ 4.0 and later
int i;
// This example loads all the layers in a file to a bitmap list
m_Lead1.GetFileInfo("c:\\temp\\layers.psd", 0, 0);
if(m_Lead1.GetInfoLayers() == 0)
MessageBox("This file has no layers!", "Info");
else
{
m_Lead1.LoadLayer("c:\\temp\\layers.psd", 0, 0);
m_Lead1.SetRefBitmap(TRUE);
for(i = 1; i < m_Lead1.GetInfoLayers(); i++)
{
m_Lead2.LoadLayer("c:\\temp\\layers.psd", 0, i);
m_Lead1.InsertBitmapListItem(-1, m_Lead2.GetBitmap());
}
}