Skip to main content
Known Participant
August 4, 2021
Question

Photo frame action set and batch automation

  • August 4, 2021
  • 3 replies
  • 4839 views

Hi everyone,
l have a background image which is an interior room render that has a blank photo frame as part of the render. l would like to add a photo to the inside of this frame and then create an action set that l can use in a batch automation to process several images into this frame as separate jpgs. l cannot figure what actions need to be recorded for this to work.

3 replies

JJMack
Community Expert
Community Expert
August 4, 2021

That would be hard to do or impossible to do with an Action.  For all image will not have the same aspect ratio as the frame.  Also the Batch processor would  open the Picture Images not the frame image. So the action would need to get the frame image into the open image picture document the action would need to scale the current image for the Frame images picture ares set the document canvas size and resolution to the Frame Image canvas size and resolution then place in the frame image into the current document , Move the image layer above the placed  smart object layer you frame image and position the image over the frame and mask the image layer to the frame's aspect ratio shape. Finally save the composite image to an output folder with the Image's name. before closing no save the current document.

 

However, it would be a simple task to make your frame images a PSD Template that could be batch populated with your images using one of my free scripts.  Any image that does not have the same aspect ratio as the frame will  look like a centered frame aspect ratio crop. Free Photoshop Photo Collage and Mockup Toolkit 

 

Image Aspect Ratio is very important.  Placed image should have a aspect ratio like the frames aspect ratio...

 

There are scripts that will frame any aspect ratio image and  adding frame the any aspect ratio image is an easy Action you can record.  Adobe installs a Frame Action set in Photoshop.

JJMack
Known Participant
August 5, 2021

Thanks for your response JJMack.

So are you saying the process l've listed below has no workaround to be a possible action command?
All my photo images are the same size/resolution and at an aspect ratio of 1.414:1. Majority of the frame images are the same aspect ratio 1.414:1 either landscape or portrait, however there will be other frame images that are not this same ratio in which l would have to mask the photo image to fit as you said.

l'm not very familiar/knowlegable with the use of scripts but you're saying if l create a PSD template for the frame image/s (A) the l can use your 'Simple Mockup Templates' scripts to batch place my photo images (B) into the frame image (A)?



Process l've been trying.

Aug 06, 2021

JJMack
Community Expert
Community Expert
August 7, 2021

Batch would open your replacement image not your frame image. It may be possible for an action to do what you want. An Action can not test that the current image is the correct size it can however add an empty layer so it can flatten any image document opened by batch then use  Use Fit Image size the current image to fit within the frame's known image area canvas size. Then add white canvas to insure the image is the correct known size.The action would then convert the background layer to a normal layer..So it can add transparent canvas to make the Document the correct canvas size for the frame Image file known canvas size and resolution. The Frame image file would then be placed into the current document and moved to the bottom the stack. The Action then select the Frame's image area and aligns the top image layer to the selection saves the composite as a jpeg to an output folder  finally it closes no save the current document and batch open the next image,

 

You would need to record a complex action like that for each Frame type template you create,  The action has to record the Frame file path and name in the place  step it also has to select the image are in the placed frame's. The size of the frame's image canvas area need to be recorded into the Fit Images step and the canvas size of the image area and the canvas size of the frame file need to be recorded into the two canvas size steps canvas sizes of the Frame document and canvas sized of the framed document frame image area to be able to place in the frame document and it must record the select area in the placed in layer selecting the Image area to align the image layet to it.

 

You have never used Image processor, Photomerge, merge to hdr, contact sheet II, export layer to files, load file into a stack etc. Scripts can do more than Actions. They are Programs not just a sequence of fixed action steps like Actions.

 

 

JJMack
Bojan Živković11378569
Community Expert
Community Expert
August 4, 2021

"l would like to add a photo to the inside of this frame"

 

This is first tricky part that needs to be adressed: do you have layered file or flat image? That is first stone, the rest is described in @c.pfaffenbichler answer. We need much more details, ideally with screenshots or file uploaded somewhere to see it.

 

Another huge part are files for replacement. Do you have images with the same dimensions and resolution (and which resolution) or files with random dimensions and resolution?

Known Participant
August 5, 2021

Thanks for your response Bojan.
It is a layered file.

Aug 06, 2021

c.pfaffenbichler
Community Expert
Community Expert
August 4, 2021

Please describe the process and parameters – what is the Layer structure of the image; are the replacement images identical in size and resolution; in which file format do you want to save the resulting variations; what is the naming convention; …? 

Known Participant
August 5, 2021

Thanks for your response.
The photos l'm trying to batch place within the frame are all the same image size and resolution at 59.4cm x 42cm (A2) at 300 DPI.
The background render image is an image size and resolution of 3400px x 2650px at 300 DPI.
l have various background images that l need to create actions for as they are different sizes but all at 300 DPI.
For the purpose of minimal confusion l will name the background render image as 'image A' and the photo image that l'm looking to place in the frame as 'image B'.
Here's the process l've been trying.

1. Before recording the action, open the background render image A.

2. Hit record, open the photo image B, copy and paste image B onto image A. Image B is now above image A layer.
3. Move and transform the image B to fit within the photo frame in image A.
4. The l click 'Place embedded' and select image A.
5. Move image A layer below image B.
6. Select 'Save as' and save image as a jpeg in new folder.
7. Select 'Close' and select 'no' to saving changes to document. Stop the action recording.

l then try to create a batch automation by selecting the 'source' folder containing all the image Bs and set the 'destination' folder in a new folder. l select the box for both 'Override action "Open" commands' and 'Override action "Save as" commands'.

Here are some screenshots showing action process.