It is recommended that LayersSaveToFile and LayersLoadFromFile be modified to include a parameter AIncludeBaseLayer: boolean. My thinking is that layer 0 or the baselayer is not really a layer. It is a baseimage. If this is added then all the layers excluding the base layer could easily be added to an existing base image. This would be a useful feature to add which is easily coded.
function LayersLoadFromFile(const FileName: String; AIncludeBaseImage): Boolean;
procedure LayersSaveToFile(const FileName: String; CompressionFormat: TIOFileType; AIncludeBaseImage);
If AIncludeBaseImage is True then all layers are loaded or saved.
If AIncludeBaseImage is False then layers 1 to LayerCount are loaded or saved.
This can be achieved by creating a TimageEnView at runtime and loading the layers into the runtime then copying the layers to the designtime TimageEnView, but modified methods to achive this would be less cumbersome:
if iImageEnView.LayersCount > 1 then
for i := 1 to iImageEnView.LayersCount-1 do
begin
iIndex := ImageEnView.LayersAdd;
ImageEnView.Layers[iIndex].Assign(iImageEnView.Layers[i]);
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development