TIOParams.IEN_StoreBackground
TIOParams.IEN_StoreBackground
Declaration
property IEN_StoreBackground: Boolean;
Description
Specifies whether the image background (layer 0) is saved to the IEN file.
When
IEN_StoreBackground = True, the background image and all other layers are saved.
When
IEN_StoreBackground = False, layers 1 to LayersCount -1 are saved, and layer 0 is skipped.
Note:
IEN_StoreBackground has no effect when loading, to load layers without the background layer, see the examples for
LoadFromFileIENDefault: True
// Save annotations only
ImageEnView1.IO.Params.IEN_StoreBackground := False;
ImageEnView1.IO.SaveToFile( 'D:\annot.ien' );
// Load an image that has been saved with IEN_StoreBackground = False
// Load background image
ImageEnView1.IO.LoadFromFile( 'C:\image.jpg' );
// Load annotations
ImageEnView1.IO.LoadFromFile( 'D:\annot.ien' );
// Save the selected layer as a file (that can be imported into other layer sets)
tempView := TImageEnView.Create(nil);
try
idx := tempView.LayersAdd(ImageEnView1.CurrentLayer);
// Reset layer position to ensure good preview
tempView.Layers[idx].PosX := 0;
tempView.Layers[idx].PosY := 0;
tempView.IO.Params.IEN_StoreBackground := False;
tempView.IO.SaveToFileIEN( SelLayerFilename );
finally
tempView.Free;
end;