SaveLayers example for C++ Builder
int i;
// Save all the extra bitmaps in the bitmap list as layers
LEADImage1->SaveLayers = True;
for (i= 1; i < (int)LEADImage1->BitmapListCount; i ++ )
{
// reset the layer info so all the layers are saved from 0,0 offset
LEADImage1->LayerLeft [i]= 0;
LEADImage1->LayerTop[i] = 0;
LEADImage1->LayerBlendModeKey[i]= "dark";
LEADImage1->LayerClipping[i]= 0;
LEADImage1->LayerOpacity[i] = 40;
LEADImage1->LayerMaskBitmap[i]= 0;
}
// set the active bitmap to be the first in the list
LEADImage1->Save ("c:\\temp\\layers.psd", FILE_PSD, 0, 0, SAVE_OVERWRITE);