Need Scripting Help to process 1000 images

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

Posts: 1
Joined: Sun Sep 18, 2022 7:51 pm

Need Scripting Help to process 1000 images

Post by threplogle »

Hello all, Thanks in advance for any and all help with this matter.

Here's my problem:
I have approx. 1000 images that were shot for a timelapse and there's quite a bit of camera movement due to the instability of the platform that it was on. I have the 'Load Files into Stack' script running on another computer but after two days (a solid 48 hours) it's still not finished so I'm seeking a different solution and I think it would be in scripting.

My fix:
What I'd like to be able to do is use a reference image to align all of the other 999 images to, crop the image, then export the layer to an output folder.
I have already created an PS action that:
1) Unlocks the background layer (reference image, which then becomes "layer 0")
2) Selects All Layers
3) Rasterizes All Layers
4) Aligns the layers
5) Crops the layers to 16x9 format
6) Hides "Layer 0"
7) Exports visible layers to a folder on the desktop
8) Closes All

The important thing above is that all files are aligned to the reference image.

The PS Action above seems to work perfectly.

What I need the script to do:
1. Opens reference image (with dialog box for you to select reference image)
2. Opens dialog box to select folder where 'images to be aligned' are stored
3. Imports the first image in the folder into the current document (using the 'Place Embedded' command?)
4. Runs the PS Action above
5. Starts back at 1 and opens the reference image (with no dialog box)
6. Imports the next image in the folder
7. Runs the PS Action above
....and continues until all images in the folder have been aligned.

I hope this all makes sense. Thanks again!