Open multiple images as one layered file

AB
Posted By
Andy_Bay
Dec 17, 2007
Views
1230
Replies
11
Status
Closed
Hi!

I’m doing a gif animation in PS and have five pictures that I need to have as layers on the top of each other. At the moment I’m opening them and copy-pasting them on one of the images to make layers, but this is slow and sometimes confusing with all the images open at the same time.

Is there any way to just tell Photoshop to open all the files so that they are automatically stacked on the top of each other as layers? Please tell me this is possible!

Any help would be highly appreciated! Thanks!

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

P
Phosphor
Dec 17, 2007
What version?

One way is to out all the files except the target file in a folder. Make an Action consisting of Duplicate Layer using the target file as the Destination. Run that action as a Batch on the folder full of files.
AB
Andy_Bay
Dec 17, 2007
I have Master Collection CS3 so I guess it is CS3 extended or something. Anyway, thanks for the tip! If I understood it correctly, it is then possible to duplicate frames so that they end up on an other file? That’s cool if I understood correctly!
P
Phosphor
Dec 17, 2007
That’s correct…NOTE: The target file needs to be open for the Action to work. Batch opens each file, so the action would go, Duplicate Layer Destination: target file. Close.

You may also have a script that can do this. I am at ver.CS so I don’t have the script in question. It’s called Files to Stack or something like that.
SU
Sergei_Urlof
Dec 17, 2007
In Photoshop select menu File => Scripts => Load Files into Stack. This creates a layer for each of the files you select. It isn’t necessary to have any files open to run this command.
AB
Andy_Bay
Dec 17, 2007
Grrrreat!!!

Thanks a lot for your help!
DF
Del_Frost
Apr 23, 2008
This script doesn’t appear in my default list of scripts. Is it available anywhere or is it perhaps part of Photoshop extended?
CY
curt_young
Apr 23, 2008
Are using the drop down menus under File > Scripts > Load Files into Stack?
DF
Del_Frost
Apr 23, 2008
Well, yes that’s where I’m looking, as mentioned a couple of posts back but that option is not there.

I’m guessing it’s because I’m still using CS2 & I just wanted to confirm that it is indeed something that’s been introduced in CS3 or Extended.
T
TLL
Apr 23, 2008
Yes this a CS3 feature, although I remember it being avaiable as a separate download somewhere – it works w/CS2 (and 7 I think).
I’ll copy it below, save it in Notepad, name it "Load Files into Stack.jsx" (no quotes) and put it in C:\Program Files\Adobe\Adobe Photoshop CS2\Presets\Scripts\

// (c) Copyright 2006. Adobe Systems, Incorporated. All rights reserved.

/*
@@@@ Load Files into Stack.jsx 1.0.0.0
* /

//
// Load Files into Stack.jsx – does just that.
//

/*

// BEGIN__HARVEST_EXCEPTION_ZSTRING

<javascriptresource>
<name>$$$/JavaScripts/LoadFilesintoStack/Menu=Load Files into Stack…</name> <about>$$$/JavaScripts/LoadFilesintoStack/About=Load Files into Stack ^r^rCopyright 2006-2007 Adobe Systems Incorporated. All rights reserved.^r^rLoads multiple files into a stack object.</about>
</javascriptresource>

// END__HARVEST_EXCEPTION_ZSTRING

* /

// debug level: 0-2 (0:disable, 1:break on error, 2:break at beginning) //$.level = (Window.version.search("d") != -1) ? 1 : 0; // This chokes bridge $.level = 0;

// debugger; // launch debugger on next line

// on localized builds we pull the $$$/Strings from a .dat file $.localize = true;

// Put header files in a "Stack Scripts Only" folder. The "…Only" tells // PS not to place it in the menu. For that reason, we do -not- localize that // portion of the folder name.
var g_StackScriptFolderPath = app.path + "/"+ localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts ") + "/"
+ localize("$$$/Private/LoadStack/StackScriptOnly=Stack Scripts Only/");

$.evalFile(g_StackScriptFolderPath + "LatteUI.jsx");

$.evalFile(g_StackScriptFolderPath + "StackSupport.jsx");

$.evalFile(g_StackScriptFolderPath + "CreateImageStack.jsx");

/*********************************************************** */ // loadLayers routines

loadLayers = new ImageStackCreator( localize("$$$/AdobePlugin/Shared/LoadStack/Process/Name=Load Layers"),
localize(‘$$$/AdobePlugin/Shared/LoadStack/Auto/untitled=Unt itled’ ) );

// LoadLayers is less restrictive than MergeToHDR
loadLayers.mustBeSameSize = false; // Images’ height & width don’t need to match loadLayers.mustBeUnmodifiedRaw = false; // Exposure adjustements in Camera raw are allowed loadLayers.mustNotBe32Bit = false; // 32 bit images
loadLayers.createSmartObject = false; // If true, option to create smart object is checked.

// Add hooks to read the value of the "Create Smart Object" checkbox loadLayers.customDialogSetup = function( w )
{
w.findControl(‘_createSO’).value = loadLayers.createSmartObject; if (! app.featureEnabled( localize( "$$$/private/ExtendedImageStackCreation=ImageStack Creation" ) ))
w.findControl(‘_createSO’).hide();
}

loadLayers.customDialogFunction = function( w )
{
loadLayers.createSmartObject = w.findControl(‘_createSO’).value; }

// Override the default to use "Auto" alignment. loadLayers.alignStack = function( stackDoc )
{
selectAllLayers(stackDoc, 2);
alignLayersByContent( "Auto" );
}

loadLayers.stackLayers = function()
{
var result, i, stackDoc = null;

stackDoc = this.loadStackLayers();
if (! stackDoc)
return;

// Nuke the "destination" layer that got created (M2HDR holdover) stackDoc.layers[this.pluginName].remove();

// Stack ’em up.
if (this.createSmartObject)
{
selectAllLayers( stackDoc );
executeAction( knewPlacedLayerStr, new ActionDescriptor(), DialogModes.NO ); }
}

// "Main" execution of Merge to HDR
loadLayers.doInteractiveLoad = function ()
{
this.getFilesFromBridgeOrDialog( localize("$$$/Private/LoadStack/LoadLayersexv=LoadLayers.exv ") );

if (this.stackElements)
this.stackLayers();
}

loadLayers.intoStack = function(filelist, alignFlag)
{
if (typeof(alignFlag) == ‘boolean’)
loadLayers.useAlignment = alignFlag;

if (filelist.length < 2) { alert(localize("$$$/AdobeScripts/Shared/LoadLayers/AtLeast2=At least two files must be selected to create a stack."), this.pluginName, true ); return; } var j; this.stackElements = new Array(); for (j in filelist) { var f = filelist[j]; this.stackElements.push( new StackElement( (typeof(f) == ‘string’) ? File(f) : f ) ); }

if (this.stackElements.length > 1)
this.mergeStackElements();
}

if (typeof(loadLayersFromScript) == ‘undefined’)
loadLayers.doInteractiveLoad();
DF
Del_Frost
Apr 23, 2008
Cheers for that.

Unfortunately I can’t seem to get it to work.

I know nothing about scripts so I don’t really know what I’m doing wrong.

At the moment, I’m copying from "// (c) Copyright 2006" right through to the end, pasting it into a plain text document & saving as instructed.

I get the following:

Error 22: ImageStackCreator does not have a constructor. Line: 48
->

I’m on a Mac, by the way. Would that affect anything in the script?
T
TLL
Apr 23, 2008
I should’a done this first, go here:

< http://blogs.adobe.com/jnack/2006/12/handy_new_script_for_cs 3.html >

Mac and Win versions too! I hope this will work in CS2. I’m no scripting genius by a long shot. Thank you to those of you who are!
LUK if it works…

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections