Copy link to clipboard
Copied
SCRIPT / PROCESS HELP NEEDED
I want to create a automation process where all my files from either a folder or open can be automatically formatted to 1900x1900px white square. The photo files are different aspect ratios and the white edges would vary - Vertical shots vs. Horiztonal, 4x6, 4x5, 1x1, etc.
Any help would be appreciated. Thanks!
Copy link to clipboard
Copied
Hi @RHCreative ,
There are a few different ways you could approach this. Here's what I think would be the easiest:
Run File>Scripts>Image Processor on your files to save them out as jpegs. Turn on Resize to Fit at 1900x1900.
Output all images to a folder.
Now run File>Automate>Contact Sheet II with the settings below. This will load them all into individual square PS files with a white background.
You can then run Image Processor again to save out jpegs of these open images.
Let us know if that works for ya!
Sef
Copy link to clipboard
Copied
Create an action using fit image for 1900 px on both width and height. The action would also have a canvas size step to change size to 1900 x 1900 px with white background extension. Then batch the action.
Another method is a scripted approach similar to this action.
If you search the forum for the keyword square you should find many posts on the topic:
Copy link to clipboard
Copied
Thanks, @Stephen Marsh 's solution is a little simpler, of course!
I wanted to test that, and found one step that's required to access the background color property in Canvas Size is that the image be flattened. One of those details that could drive someone insane trying to figure out.
I recorded it into a quick action. The forum won't accept .atn files though, so try this link.
Copy link to clipboard
Copied
@Sef McCullough – that is right, but a conditional action can handle the differences between flattened and layered images if there is a mix. Here is an example from a previous forum topic:
Copy link to clipboard
Copied
Oh nice @Stephen Marsh I like that solution. I'm so used to problem solving pre-conditionals that I often overlook them. This is a perfect use case.
Copy link to clipboard
Copied
@Stephen Marsh What is point in conditional layered action if action flattens image at the end of layered action? Flatten at the beginning as @Sef McCullough did in his action or exclude flatten step. The only point would be to keep open file layered, at least thats my opinion.
Copy link to clipboard
Copied
@Stephen Marsh What is point in conditional layered action if action flattens image at the end of layered action?
By @Bojan Živković
That step was not ticked/active, just a placeholder in case it was needed.
Copy link to clipboard
Copied
I have another question for that action. How you move White BG layer to bottom most layer if layered file has Background layer?
Copy link to clipboard
Copied
I have another question for that action. How you move White BG layer to bottom most layer if layered file has Background layer?
By @Bojan Živković
I don't remember that the original action was written for that scenario.
Images were either flattened – or layered without a Background layer. As you suggest, one can't move something below the locked Background layer.
Copy link to clipboard
Copied
It served as good guide to create action for purpose in this thread. I am waiting for feedback. In my action it will select bottom most layer in layered file then check for Background layer in if conditional step and proceed with above suggested step if doc does not have Background layer or it will play another, two step action if document contains Background layer.
Copy link to clipboard
Copied
@Bojan Živković – Feedback from myself, or somebody else?
Copy link to clipboard
Copied
I meant from OP. Your is very welcome if you have time and money.
Copy link to clipboard
Copied
The only thing you are missing is Width in the Canvas Size step, with fixed Width to 1900 it can work with any orientation and ratio.
If you want to keep layers in open layered files then it does have sense to use conditional actions.
Copy link to clipboard
Copied
@RHCreative – So where are you at?
Copy link to clipboard
Copied
Hi @Stephen Marsh & @Sef McCullough
Thanks for your patience – in busy season. Didn't mean to leave you hangning!
@Sef McCulloughThank you for creating the action! It worked on horizontal images but not verticals. Maybe I'm doing something wrong? P.S. - really enjoyed your retouching tutorial. You're a wizard!
@Stephen Marsh – Thank you for providing this. How do I recreate the action off that screenshot? My experience of creating actions is limited. Any insight or direction appreciated!
Thanks again!
Copy link to clipboard
Copied
Here is example action based on action above that can do the job, it will keep open layered files as layered but with new dimensions and new canvas size https://drive.google.com/file/d/1emjq8qTTu6Ots0CsmyfhovM80tSiB3dh/view?usp=sharing
If anything goes wrong please report to fix.
Test action multiple times with multiple files and scenarios like layered with background layer, layered without background layer, PNG file without background layer but single layer and JPEG with single background layer. I have tested few time, more relying on my "experience" that everything should work fine.