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
 Merge two PSD files in one instance ImageEN
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - May 31 2013 :  04:38:23  Show Profile  Reply
I want to load two different PSD files with many layers into one instance of ImageEnView.

If I load a PDF file that has layers and try to load another PSD files that has layers then the layers of previously loaded file gets removed and replaced by the layers of the last loaded PSD file.

How can I load two different PSD files with layers into one instance of ImageENView?

TIA

Yogi Yang


Yogi Yang

w2m

USA
1990 Posts

Posted - May 31 2013 :  07:59:50  Show Profile  Reply
You can replace the layers automatically by setting ImageEnView1.IO.Params.PSD_ReplaceLayers to true before loading the file. If PSD_LoadLayers is True then the layers in the PSD file replace any layers already in ImageEnView. If PSD_ReplaceLayers is False then all layers in the PSD file will be added to the layers in ImageEnView. When PSD_ReplaceLayers is True, the content of the PSD file replaces the content of the ImageEnView.

So Normal loading is:
ImageEnView1.IO.Params.PSD_LoadLayers := True;
ImageEnView1.IO.Params.PSD_ReplaceLayers := True;
ImageEnView1.IO.LoadFromFilePSD(AFilename);
To Add all layers:
ImageEnView1.IO.Params.PSD_LoadLayers := True;
ImageEnView1.IO.Params.PSD_ReplaceLayers := False;
ImageEnView1.IO.LoadFromFilePSD(AFilename);

So to test:
1. Load first PSD file with:
if iFileType = ioPSD then
begin
  ImageEnView1.IO.Params.PSD_LoadLayers := True;
  ImageEnView1.IO.Params.PSD_ReplaceLayers := True;
  ImageEnView1.IO.LoadFromFile(iFilePath);
end;

2. Load the second PSD file with
if iFileType = ioPSD then
begin
  ImageEnView1.IO.Params.PSD_LoadLayers := True;
  ImageEnView1.IO.Params.PSD_ReplaceLayers := False;
  ImageEnView1.IO.LoadFromFilePSD(AFilename);
end;

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: