Photoshop: How to Stack Groups of 3 Images

Discuss photography techniques, equipment, etc. here.
Active Member
User avatar
Posts: 74
Joined: Fri Sep 26, 2008 7:41 pm
Location: Maryland, USA

Photoshop: How to Stack Groups of 3 Images

Postby JARHTMD » Fri Feb 19, 2010 5:11 am

I have played around “a little” with recording and running Photoshop CS3 actions. I’m not asking for a tutorial on actions, but I would appreciate being “pointed in the right direction”.

I want to gather all the images from a folder in groups of 3 images and output as psd files, with each of the 3 source images on a separate layer. Separating the source images into 3 separate folders would not be a problem if that makes for a simpler/easier solution.

I know that “File | Scripts | Load files into Stack” will open files and stack into layers. And I know that “File | Automate | Batch” will run an action on all files in a folder. But, I don’t know how to apply either of those procedures/concepts to this problem. I also vaguely remember (long ago) having problems naming files saved by an action.

Any ideas/suggestions will be greatly appreciated.
Canon EOS 40D, 20D, 60D; Photoshop CS3; PSG 3.2(build 2047)

.
User avatar
Posts: 7501
Joined: Wed Nov 29, 2006 6:35 pm
Location: Kirkland,Wash, USA, Earth

Re: Photoshop: How to Stack Groups of 3 Images

Postby gpsmikey » Fri Feb 19, 2010 8:08 am

Check out Photoshop scripting -- Lynda.com has several online courses you can view that will go into the process. You are probably best using javascript (Photoshop can be scripted in Applescript, Visual Basic and JavaScript - only the JavaScript can run on both Mac and PC platforms). Also check out the scripting support in the install directory for Photoshop on your system - there is a bunch of stuff there including the JavaScript reference manual in pdf format and other good stuff. If you are going to be working with JavaScript, you might also consider "JavaScript the definitive guide" by David Flanigan (O'Reilly Publishers - Amazon and others carry it). The "Extendscript Toolkit" that comes with Photoshop is not a bad editor and debugger (somewhat primative for CS2, but looks like it gets much better for CS3 and CS4 although I have not used it with 3 or 4 ). I just had to write a JavaScript for my little project that was fairly simple - when I was done with an image, it saved it with the name "_mod" in a modified folder and then resized the image down to 1600pixels on the long axis and saved that to a "resized" directory with the name "_1600px" appended to the original image name. Javascript lets you grab file names etc then build new name strings as needed etc. Takes a bit to learn, but very powerful (and you can call javascripts from an action as well if you want).

The online course at Lynda.com that I was watching (in fact bought the DVD) is "Photoshop CS2 - Actions and Automation" by Deke McClelland. I thought it was pretty good and most importantly, gave you an idea how to even get started. Often, you see something on scripting for example and they give a sample of code, but you never get to find out just how you are supposed to a) run it or b) even do anything useful with it.

You did ask :twisted:

mikey
You can't have too many gadgets or too much disk space !!
mikey (PSP6, Photoshop CS6, Vegas Pro 14, Acid 7, BluffTitler, Nikon D300s, D810)
Lots of PIC and Arduino microprocessor stuff too !!

dnmilikan

Re: Photoshop: How to Stack Groups of 3 Images

Postby dnmilikan » Sat Feb 20, 2010 1:53 am

In the interest of efficacy, this is best accomplished by creating and running an action inside PS. Scripting is not required because it is overly convoluted and excessively complicates the process.

Since you asked for basic direction, I will leave my explanation at this. Search out how to create and run an action. Run this action you have created on your file of images. This is simple and easily accomplished.

Donald Miller

.
User avatar
Posts: 7501
Joined: Wed Nov 29, 2006 6:35 pm
Location: Kirkland,Wash, USA, Earth

Re: Photoshop: How to Stack Groups of 3 Images

Postby gpsmikey » Sat Feb 20, 2010 8:43 am

I too was unable to find the incantation to be able to rename files and change names in actions which was why I ended up using scripting (which does give you access to a filename, path, extension etc). That was the reason I suggested scripting (if you look at the "batch process", "image processor" etc, you will find they are also JavaScripts). I would love to see an action that does allow you to change filenames like that and combine multiple files (after reading a directory), but I could not find a way to do it.

mikey
You can't have too many gadgets or too much disk space !!
mikey (PSP6, Photoshop CS6, Vegas Pro 14, Acid 7, BluffTitler, Nikon D300s, D810)
Lots of PIC and Arduino microprocessor stuff too !!

dnmilikan

Re: Photoshop: How to Stack Groups of 3 Images

Postby dnmilikan » Sat Feb 20, 2010 5:16 pm

Mikey,

With all due respect, I think that if you check into the later versions of PS that the capability you mention is incorporated therein. I know that it exists in CS4 extended. It might be time to upgrade to a later version if that is what you want.

BTW your use of the word "incantation" appears ill chosen since there is nothing inherently "magical" about the process being discussed. I mention this since you have appeared quite sensitive to Improper spelling and improper use of language in the past and thus I was sure that you would want to be aware of your imprecise use of language.

Donald Miller

Active Member
User avatar
Posts: 74
Joined: Fri Sep 26, 2008 7:41 pm
Location: Maryland, USA

Re: Photoshop: How to Stack Groups of 3 Images

Postby JARHTMD » Sat Feb 20, 2010 6:33 pm

dnmilikan wrote:ISince you asked for basic direction, I will leave my explanation at this. Search out how to create and run an action. Run this action you have created on your file of images. This is simple and easily accomplished.
Donald Miller

I realize that I said "I’m not asking for a tutorial on actions...", but I thought my question made it clear that I don't know how to accomplish this task within an action. I've created & run actions before, but need help with this particular problem. Hence, my original posting.

"Files | Script | Load Files into Stack" presents a browse box for selecting the source files. How do I pick the files in a batch process so that they vary with each pass? Do I have to sit there and select another group on each pass? If so, that sort of removes it from the realm "batch processing" as I've always known it. Sometimes there will be hundreds of files involved. I'd like to start the batch & go get a cup of coffee, or whatever.

"Files | Automate | Batch" steps thru the folder working on every file. How do I get it to skip numbers 2,3,5,6,8,9,etc? I suppose I could just let it "blow up" at the end when it reaches the point when there's no longer a "file+2" (assuming that the source file problem above has been solved). I could then go to the destination folder and manually delete every 2nd & 3rd file. Again, there goes "batch processing".

So I'm restating my question & asking for more than basic directions.
Canon EOS 40D, 20D, 60D; Photoshop CS3; PSG 3.2(build 2047)

dnmilikan

Re: Photoshop: How to Stack Groups of 3 Images

Postby dnmilikan » Sat Feb 20, 2010 8:23 pm

Hello,

Thank you for further clarification of your actual needs.

You will need to create the necessary action inside PS to duplicate (to save your original images in their source location) and stack the three images and place them into a sub-folder inside a destination folder for your stacked images. Once you have done this you will need to create the required number and sequentially identified sub-folders inside the destination folder as the destination for all of your subsequent image stacks. Once you have done this you will run this self-created action inside the batch processor using the source and destination folders you have created relying on the specific identifying data for your source photos (various parameters are available to the user) and of the processed images indicating the sequential parameter by which they are placed into the sub-folder (various parameters are available to the user) using the the action you have created. This will permit you to produce three stacked images each in it's own sub-folder for your desired final dissemination.

Donald Miller

.
User avatar
Posts: 7501
Joined: Wed Nov 29, 2006 6:35 pm
Location: Kirkland,Wash, USA, Earth

Re: Photoshop: How to Stack Groups of 3 Images

Postby gpsmikey » Sat Feb 20, 2010 9:18 pm

Sounds like Donald has a solution for you. As I indicated, when I was trying to do something similar, I was not able to find a way to make it work for me without using scripting. There are usually multiple ways to solve the same problem so hopefully his method will work for you.

mikey
You can't have too many gadgets or too much disk space !!
mikey (PSP6, Photoshop CS6, Vegas Pro 14, Acid 7, BluffTitler, Nikon D300s, D810)
Lots of PIC and Arduino microprocessor stuff too !!

Active Member
User avatar
Posts: 74
Joined: Fri Sep 26, 2008 7:41 pm
Location: Maryland, USA

Re: Photoshop: How to Stack Groups of 3 Images

Postby JARHTMD » Sun Feb 21, 2010 1:12 pm

Thanks, Don.

I’m still trying to grasp the general outline & flow of the solution that you’ve described. It may take a while & I’ll probably have to come back time & again (hopefully, not too often) with questions (hopefully, not too elementary). It’s apparent that my playing around "a little" with recording and running Photoshop CS3 actions hasn’t prepared me for this. I have a lot to learn.

Anyway, here’s what I’ve tried “independently” before your reply.

I created an action with only 2 steps.
1. File | Scripts | Load Files into Stacks
2. Save As (untitled)

Then I ran it (File | Automate | Batch).
1. I had to
a. Browse, etc to select each group of 3.
b. Cancel the action for each 2nd & 3rd image in each group.

2. The desired stacked psd images were written as, untitled1.psd, untitled2.psd, untitled3.psd, etc in the same folder that I used when I created the action. That was expected because of the SaveAs within the action. Fixing the location is just a matter of establishing a constant working “Stack” folder into which all executions will send output, but I wish I could construct a name from the input (similar to destination folder). Looks like I’ll just have to rename afterwards. I'll use BatchRenamingUtilty for that.

3. The stated “destination” folder received only 1-layer psd files of each of the input files (regardless of whether the action was cancelled). Of course, that’s where the output naming specs applied. Again, that’s not really a problem, because all those files are “throw-aways” anyway & will be deleted. In fact, segregating from the 3-layer images is a plus.

This preliminary method requires a lot of careful attention & hands-on selecting, but it’s better than doing everything manually. I haven't given up on a hands-free version.

Just to restate my need & maybe clarify.
Pic1.jpg + Pic2.jpg + Pic3.jpg ----------> untitled1.psd (I’d like Pic1-stack.psd)
Pic4.jpg + Pic5.jpg + Pic6.jpg ----------> untitled2.psd (I’d like Pic4-stack.psd)
Pic7.jpg + Pic8.jpg + Pic9.jpg ----------> untitled3.psd (I’d like Pic7-stack.psd)

Jim
Canon EOS 40D, 20D, 60D; Photoshop CS3; PSG 3.2(build 2047)

Active Member
User avatar
Posts: 74
Joined: Fri Sep 26, 2008 7:41 pm
Location: Maryland, USA

Re: Photoshop: How to Stack Groups of 3 Images

Postby JARHTMD » Mon Feb 22, 2010 10:44 am

I hate to be so dense, but I just don’t understand your instructions. I don’t mean to sound unappreciative of your suggestion, but w/o clarification, I simply don’t understand.

Maybe, if you could be a little more specific, I will understand. Again, I know that I originally asked “point me in the right direction”, but a few “click here, click there” would be very helpful.

You will need to create the necessary action inside PS to duplicate (to save your original images in their source location) and stack the three images and place them into a sub-folder inside a destination folder for your stacked images. Once you have done this…

That pretty well states my goal. When I’m done “stacking the three images and placing them into a sub-folder”, I’m done. Or are you saying to separate the input (source), by 3’s, into separate sub-folders? It’s easy enough to duplicate (copy) files/folders outside of Photoshop, but I don’t know how to create folders/sub-folders within Photoshop.

Once you have done this you will need to create the required number and sequentially identified sub-folders inside the destination folder as the destination for all of your subsequent image stacks.

Does this mean that I need to create a separate sub-folder for each output 3-layer psd file? Again, I don’t know how to do that within Photoshop.

Once you have done this you will run this self-created action inside the batch processor using the source and destination folders you have created relying on the specific identifying data for your source photos (various parameters are available to the user) and of the processed images indicating the sequential parameter by which they are placed into the sub-folder (various parameters are available to the user) using the the action you have created. This will permit you to produce three stacked images each in it's own sub-folder for your desired final dissemination.

I think understanding this will be easier once the "preliminaries" are understood.

Just for clarification; that we're defining "stacked" the same....there will be one(1)output image file (containing 3 "stacked" layers) for every three(3) input image files.
Pic1.jpg + Pic2.jpg + Pic3.jpg ----------> Folder/Subfolder/Pic1-stack.psd
Pic4.jpg + Pic5.jpg + Pic6.jpg ----------> Folder/Subfolder/Pic4-stack.psd
Pic7.jpg + Pic8.jpg + Pic9.jpg ----------> Folder/Subfolder/Pic7-stack.psd
Canon EOS 40D, 20D, 60D; Photoshop CS3; PSG 3.2(build 2047)

Active Member
User avatar
Posts: 74
Joined: Fri Sep 26, 2008 7:41 pm
Location: Maryland, USA

Re: Photoshop: How to Stack Groups of 3 Images

Postby JARHTMD » Mon Feb 22, 2010 4:32 pm

Thanks Donald & Mikey. I also posted in the forum at http://ps-scripts.com/. I got a reply with a script that does exactly what I want. Donald, I'm sorry that I was too dense to understand your solution.
Canon EOS 40D, 20D, 60D; Photoshop CS3; PSG 3.2(build 2047)

.
User avatar
Posts: 7501
Joined: Wed Nov 29, 2006 6:35 pm
Location: Kirkland,Wash, USA, Earth

Re: Photoshop: How to Stack Groups of 3 Images

Postby gpsmikey » Mon Feb 22, 2010 4:44 pm

Glad someone in the Photoshop Scripts bunch was able to provide a quick solution for you !! On to the next speed bump in the road as they say :D

mikey
You can't have too many gadgets or too much disk space !!
mikey (PSP6, Photoshop CS6, Vegas Pro 14, Acid 7, BluffTitler, Nikon D300s, D810)
Lots of PIC and Arduino microprocessor stuff too !!

Return to Photography

Who is online

Users browsing this forum: No registered users and 14 guests