Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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; …?
Copy link to clipboard
Copied
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.
 
 
Copy link to clipboard
Copied
"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?
Copy link to clipboard
Copied
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?
That’s definitely an important issue when automating such tasks.
If the images should be different in size and aspect what rule should determine the placement (can they be clipped, distorted, …)?
Copy link to clipboard
Copied
Thanks for your response Bojan.
It is a layered file.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks for that JJMack. I'll try setup this action set. l did have a crack of your 'BatchOneIMageCollage' script and had success although is it possible to modify this script so it sets the blending mode of the replacement image to multiply?
Copy link to clipboard
Copied
There is no need to modify the script. You can add Multiply as a Image Layer style option.
My Collage Scripts have an options to add a layer style to placed image layers. I supply a few Image and text layer style in my Package. You can select these in my scripts dialog. All the script use a Photo Collage Preferences scripts for the lists of layer Style names supported by the scripts. So you can Add you own layer styles. The script name is "PCTpreferences.jsx" the var statement
var imageStyleList = ['Default Style (None)','Photo Collage Style 1','Photo Collage Style 2','Photo Collage Style 3','Photo Collage Style 4','Photo Collage Style 5','Photo Collage Style 6','Photo Collage Style 7','Photo Collage Style 8','Photo Collage Style 9','Photo Collage Style 10','Photo Collage Style 11'];
Is the array used for for available image layer styles. So you can add your own Image Layer styles. Set a new Layer style Preset in your Photoshop Styles Palette that sets the layer blending to multiply. Add this preset name to the var imageStyleList array. Then select this Multiply style in 'BatchOneIMageCollage' script for Image layers.
Copy link to clipboard
Copied
l've added new layer style to the 'imageStyleList array' however it doesn't seem to appear in the 'BatchOneIMageCollage' styles list. l think l may have missed a step here.
Copy link to clipboard
Copied
l also tried running the 'PCTpreferences.jsx' script but nothing happened in Photoshop.
Copy link to clipboard
Copied
You need to add the style you add the Style you added to Photoshops's Style Palette into the var image Style list in the 'PCTpreferences.jsx' script on your machine, Edit the 'PCTpreferences.jsx' script add: ", 'Your Multiply Style Name' "into the list
var imageStyleList = ['Default Style (None)','Photo Collage Style 1','Photo Collage Style 2','Photo Collage Style 3','Photo Collage Style 4','Photo Collage Style 5','Photo Collage Style 6','Photo Collage Style 7','Photo Collage Style 8','Photo Collage Style 9','Photo Collage Style 10','Photo Collage Style 11', 'Your Multiply Style Name' ];
If the Late style you add blend mode is multiply and you add no style effects. The Placed smart object image layer will have no "fx" style icon in the layers palette the layer blend mode will be your Style blend mode.
Copy link to clipboard
Copied
l don't know how to edit the 'PCTpreferences.jsx' script though, if l open it in Photoshop nothing appears or happens, it's just a blank Photoshop screen. Although if l double click/open the 'Photo Collage Styles.asl' the 'Photo Collage Styles' appears in my 'Styles' window and l've then added my multiply style preset to it.
 
l'm not sure how you get this 'var imageStyleList' to appear.
Copy link to clipboard
Copied
Edit the 'PCTpreferences.jsx' file with a text editor add the style name and save the file.
Copy link to clipboard
Copied
Thanks for that. l've edited the 'PCTpreferences.jsx' scrip in the text editor, the 'Mulitply' layer style is now appearing however it isn't changing the added image's layer style to multiply for some reason. Do you know why this might be happening?
Copy link to clipboard
Copied
Although my psd file of the exported image has a different layer structure to what yours is showing.
l'm guesing this is the problem.
Copy link to clipboard
Copied
Are you sure the Layer Style names are the same in the var and in your styles palette? If they do not match there will be no style effect added. There will be no error indication if the Layer style does not exist in the Image Style List. No layer style was added to you Placed Images smart object layer. When I added your Multiply style it was added on my machine as my screen capture showed.
You could create a Mockup Template instead of a Collage template. You add the Smart object Image layer that will have its Content replaced by the "BatchMockupTemplates.jsx" script. You have complete control of the smart object layer. You can scale it, add perspective distortion, warp it, style it mask it etc. Only its contents will be replaced by the script text stamping is not supported in mockup templates and the output defaults to tp Jpeg but the is an option toe save PSD as will and Ant size imat can be use with the Edit option. .The script can replace any number of smart object it does not have the 53 Image limit my collage scripts have. There is also the "BatchUpdateSmartObject.jsx" it interface is quitle like the one image collage script. Here I Placed in a 3:2 16 mega pixel PSD image as a top level Smart object layer scaled, it masked it and set blend to multiply.
Here are the output document saved by my scripts for the Collage and for mockup templates. Templates are easy to create....
Copy link to clipboard
Copied
You can have overlay layers in Collage and Mockup templates that is not a problem. I only support Image File Name stamping in Collate templates for the script knows the size, location and shape of the placed images layer via the alpha channels.
Copy link to clipboard
Copied
Thanks for that JJMack. Yes the Layer Style names are the same in the 'PCTpreferences.jsx' script as the styles palette. I think l may have created the Collage template wrong, my template uses a mask for 'Image 1', is that ok for the script?
l will give the mockup scripts l try also.
Copy link to clipboard
Copied
If the Names are exactly the sane the layer style in your Style Palette should set the placed smart object layer's blending to multiply. The Smart Object layer you show in your screen captute has blending Normal there is either a problem with the names not being the same or the Layer style added to your Photoshop Styles Palette does not havw layer blending set to multiply. Try selecting one of my Photo collage layer style like Style 3. Make syre the script is working.
Here are two template PSD files for you to try. One is a Mockup Template the other a collage template. The mockup template is a large file foe the embedded Smart Object is a layered 16 MP psd.
Copy link to clipboard
Copied
l've tried your layer styles and they are working just not my 'Multiply'.
Here are some screenshots to show the layer style name and structure and also the 'PCTpreferences.jsx'
l'm getting a 'ERROR 404 - PAGE NOT FOUND' error when clicking on those links.
Copy link to clipboard
Copied
'ERROR 404 - PAGE NOT FOUND' is a Web Browser error What are you browsing for? What Link??
You show no Style Names and no var stayement?
I showed you I had no problem adding your multiply style to to my Style Palette with the namse "Your Multiply Style Name" and to the script var and it worked.
Copy link to clipboard
Copied
When you select something my name you need to be careful in Photoshop foe many object do not have the have unique Names. You can have many layers in a document with the name "Layer 1" you can have many styles in the style palette with the name "Multiply" Duplicate names do not have always have the same content. Use the Style Palette search to make sure your style has a unique name.
If look like the two outline styles could be the sames style with different names