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
 help me, how to save layers one by one
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

atwisahs

Indonesia
4 Posts

Posted - Mar 22 2021 :  19:23:30  Show Profile  Reply
I have a wallpaper and 3 layers, how to save one by one layers in file jpeg


xequte

39053 Posts

Posted - Mar 22 2021 :  21:45:29  Show Profile  Reply
Hi

There are multiple methods, but the easiest is just to write the layer bitmap:

// Prompt user to save current layer as an image
fn := ImageEnView1.IO.ExecuteSaveDialog();
if fn <> '' then
  ImageEnView1.CurrentLayer.Bitmap.Write( fn );



If you want to iterate through all the layers, you could use:

for i := 1 {!!!} to ImageEnView1.LayersCount - 1 do
  if ImageEnView1.Layers[i].Selected then
    ImageEnView1.Layers[i].Bitmap.Write( format( 'D:\Layer%d.jpg', [i] );


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

atwisahs

Indonesia
4 Posts

Posted - Mar 23 2021 :  00:41:40  Show Profile  Reply
thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: