ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 save layer set without background?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

stkwon

20 Posts

Posted - Oct 25 2018 :  23:52:37  Show Profile  Reply
i using .ien layer set files.

if i loaded one ien file and

i want add more layers from .ien files.

so, loaded .ien file with loadfromfileIEN(FileName, True) <--

then backgroud image is change to new loaded .ien file.

how can i keep stay original background ?

xequte

39052 Posts

Posted - Oct 26 2018 :  21:45:09  Show Profile  Reply
Hi

I cannot reproduce that here.

When I call loadfromfileIEN(FileName, True) the existing background and layers are not touched and the background of the loaded file becomes an image layer.

If you do not want the background of the loaded image to be added, see the following examples...



// Append layers from a file, except the background layer
ImageEnView1.LockUpdate;
cnt := ImageEnView1.LayersCount;
ImageEnView1.IO.LoadFromFileIEN( 'D:\layers.ien', True );
ImageEnView1.LayersRemove( cnt );
ImageEnView1.UnlockUpdate();

// Load a background image, and add annotations from a layer file (except background or other image layers)
ImageEnView1.LockUpdate;
ImageEnView1.IO.LoadFromFile( 'D:\Background.jpg', True );
ImageEnView1.IO.LoadFromFileIEN( 'D:\layers.ien' );
for I := ImageEnView1.LayersCount - 1 downto 1 do
  if ImageEnView1.Layers[ I ] is TIEImageLayer then
    ImageEnView1.LayersRemove( I );
ImageEnView1.UnlockUpdate();


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: