Copy link to clipboard
Copied
I am looking for a way to place many transparent PNGs (Say 500 PNGs) on top of many different backgrounds (Over 20 backgrounds).
The end result would be 500 JPGs for each PNG file but each with a randomly picked background.
Any help please?
You can try this:
// place files on random background and save jpg;
// 2022, use it at your own risk;
var theOrigFiles = "H:\Product Photos\Designs";
var theBackgroundFiles = "H:\Product Photos\BK";
var theTargetFolder = "H:\Product Photos";
if (Folder(theOrigFiles).exists == true) {
var theOrigFiles = Folder(theOrigFiles).getFiles(/\.(psd|png)$/i);
} else {
var theOrigFiles = selectFile(true)
};
if (Folder(theBackgroundFiles).exists == true) {
var theBackgroundFiles = Folder(theB
...
Here is the final 1.4 script, there is no longer any need to use an action or batch/image processor/image processor pro as this script is now self-contained. You will be prompted to select the JPG, PNG and Save folders and the script will then create the final combined JPG files with random backgrounds.
/*
Place Random Background Image.jsx
Version 1.4, Stephen Marsh, 3rd April 2022
https://community.adobe.com/t5/photoshop-ecosystem-discussions/place-many-pngs-on-many-different-backgrounds/
...
Copy link to clipboard
Copied
Your welcome, I had fun putting some things together that I hadn't done before.
I'm also marking the script posted by @c.pfaffenbichler as correct.
Copy link to clipboard
Copied
@hameedfarah So how did you go with the two final scripts posted by @c.pfaffenbichler and myself?
Copy link to clipboard
Copied
I am so sorry for the lack of feedback. I had a faimly emergency.
I should be able to use the scripts tomorrow
Thank you so much for your kind work. You guys are truly amazing!
Copy link to clipboard
Copied
You can do it very easily by using widely used and multi-featured software called Adobe Photoshop. With the pen tool of Photoshop, you can make multiple paths in which portion you want to change the background.
Copy link to clipboard
Copied
Where do you see an author asks how to cut out subject from image?