Skip to main content
Participant
July 14, 2010
Beantwortet

Automate merge files into stack

  • July 14, 2010
  • 2 Antworten
  • 8635 Ansichten

Hi all,

I need to find a way to do the following:

Merge 4 currently open images into a single stack into separate layers.

Screen all layers

Extract the top three layers into a new file

Flatten both images and save as .tif

Any ideas?

Even scripting the 1st two steps would be great.I've tried "Merge files into stack", but it won't let me automate the "add open files" part of that.

Thanks.

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von Michael_L_Hale

You can automate loading open docs into a stack using the Load Files into Stack.jsx as long as the documents have a file( either opened from a file or have been saved at least once)

var loadLayersFromScript = true;
//@includepath "/c/program files/adobe/Adobe Photoshop CS5/Presets/Scripts/"
//@include "load files into stack.jsx"
var files = [];
for(var d =0;d<app.documents.length;d++){
    try{
        files.push(app.documents.fullName.fsName);
    }catch(e){
        alert(localize('$$$/AdobePlugin/Exposuremerge/Mustsave=Documents must be saved before they can be merged'));
    }
}
loadLayers.intoStack(files,true);

2 Antworten

Inspiring
July 15, 2010

You can automate loading open docs into a stack using the Load Files into Stack.jsx as long as the documents have a file( either opened from a file or have been saved at least once)

var loadLayersFromScript = true;
//@includepath "/c/program files/adobe/Adobe Photoshop CS5/Presets/Scripts/"
//@include "load files into stack.jsx"
var files = [];
for(var d =0;d<app.documents.length;d++){
    try{
        files.push(app.documents.fullName.fsName);
    }catch(e){
        alert(localize('$$$/AdobePlugin/Exposuremerge/Mustsave=Documents must be saved before they can be merged'));
    }
}
loadLayers.intoStack(files,true);

jmug45Autor
Participant
July 15, 2010

That's great - I'll just add this into an action and batch process from there.

Thanks.

JJMack
Community Expert
Community Expert
July 15, 2010

I can not tell you how to do it but you could look at the Image processor script the comes with Photoshop fot it has an option to process open documents. Therefore it has code to process all open documents. You may find what your looking for in therr for it also creates new documents.

JJMack