• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Place many PNGs on many different backgrounds

Explorer ,
Mar 27, 2022 Mar 27, 2022

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?

TOPICS
Actions and scripting , Windows

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Mar 28, 2022 Mar 28, 2022

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
...

Votes

Translate

Translate
Community Expert , Mar 28, 2022 Mar 28, 2022

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/
...

Votes

Translate

Translate
Adobe
Community Expert ,
Apr 03, 2022 Apr 03, 2022

Copy link to clipboard

Copied

LATEST

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 30, 2022 Mar 30, 2022

Copy link to clipboard

Copied

@hameedfarah  So how did you go with the two final scripts posted by @c.pfaffenbichler and myself?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 30, 2022 Mar 30, 2022

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 01, 2022 Apr 01, 2022

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.
Background Revomeval Service.jpg

Professional Product Photo Editor

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 02, 2022 Apr 02, 2022

Copy link to clipboard

Copied

Where do you see an author asks how to cut out subject from image?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines