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

Help!! Need to add several images to the same background and save them - action batch

Community Beginner ,
Oct 07, 2024 Oct 07, 2024

Copy link to clipboard

Copied

I did this once and i cannot remember how, it is driving me nuts.

I have a tshirt business and i need to create mockups of the same tshirt with different images

I have an image of a tshirt (1500 px x 1500 px) White background (JPG).

I have a folder with 200 PNG's images (transparent) all different sizes but smaller than the shirt

I need to create an action and run a batch or script, so i can have all the images of the shirt and each design.

I know that i did it once, I have more than 3000 images like that, we add new shirts and designs, and i need to figure out how to do it again. PLEASE anyone

TOPICS
Actions and scripting

Views

498

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
Adobe
Community Expert ,
Oct 07, 2024 Oct 07, 2024

Copy link to clipboard

Copied

Think of the steps... The batch command would open each of the 200 PNG images as an active document, then the recorded action would play to completion on each separate PNG.

 

So you need to make the action so that it places/copies/pastes the T-shirt behind the PNG layer (or moves the PNG layer above the placed T-Shirt). This will likely require canvas sizing and positioning/sizing for the PNG layer relative to the common T-Shirt being added to each image.

 

The alternative is a script.

 

EDIT: Photoshop Data-Driven Graphics (Variables) with image pixel replacement could be another option.

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 ,
Oct 07, 2024 Oct 07, 2024

Copy link to clipboard

Copied

As mentioned previously, a script is the other common approach.

 

You could use the following from the late JJMack:

 

https://github.com/MarshySwamp/JJMack-Archive

 

Specifically, the "PhotoCollageToolkit.zip" and the "BatchOneImageCollage.jsx" script. Another option is a smart object based script, such as "BatchReplaceOneObject.jsx" or perhaps "BatchUpdateSmartObject.jsx" script from the previously mentioned archive. In each case, you need an appropriate template to work with the script.

 

Yet another approach is a script using the Frame Tool to automate the placement of the PNG images onto the underlying T-shirt template.

 

There are many custom scripts for "mockups" to be found by searching this forum, most commonly phone cases and t-shirts.

 

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 Beginner ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

Thank you Stephen, I will try them to see if I can make it work

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 ,
Oct 07, 2024 Oct 07, 2024

Copy link to clipboard

Copied

Could you share some examples of what you're trying to achieve? I'm afraid I don't fully understand your task. Perhaps I can assist with actions and batch processing. However, if you find a suitable script, you can disregard using actions.

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 Beginner ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

Hi Bojan, The shirt is the main image (1200 px) I need to add the PNG Files (i have more than 800) and save each one with the shirt.

I'm attaching the shirt, the png (Cat) and the desire final image, I'm attaching other PNG (they are all different sizes)

I tried to do an action where I placed a PNG, resize it and center it, and save it, so it can do the same action on a batch, no luck. I did it before, but i cannot remember how.

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 ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

@silviob65797187 â€“ Your example image is 1200 px square, however the original background is 1500 px square.

 

Will the 1500 px image be resized to 1200 px before combining with the transparent PNG files?

 

Or will the composite images be created at 1500 px (to preserve maximum resolution) and you will then batch resize copies to 1200 px later for web publishing?

 

At 1500 px size, the design has an effective size of 390 px square (as indicated by the marquee selection in the screenshot).

 

At 1200 px size, the design has an effective size of 310 px (as indicated by the marquee selection in the screenshot).

 

Will all of the PNG files be top-centre aligned in the area as indicated here based on your sample? Or should they be middle-centre aligned in the area? Or...

 

 

area.jpg

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 ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

LATEST

This can be done using the Pixel Replacement variable and can be fully automated. If you're somewhat familiar with data sets in Photoshop, you can try that option. If not, follow the steps provided by @Stephen Marsh 

pixel replacement for t shirt design.gif

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 ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

I tested the late JJMack's "BatchOneImageCollage.jsx" script which created the layered files nice and fast using the "Image 1" alpha channel for sizing and positioning:

 

2024-10-09_12-26-17.png

2024-10-09_12-43-19.jpg

 

However, as the script masks to the area defined by the alpha channel mask, the result isn't 100%. When I disable the layer mask to remove the cropping, the design is wider than the intended result indicated by the guides. The script would either need to be modified, or a second pass batch process action or script would need to rework the initial result.

 

2024-10-09_12-31-55.jpg

 

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 ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

Here is the result of an action as I previously described:

 

2024-10-09_13-33-13.jpg

 

2024-10-09_13-35-17.png

 

For such work, taking the extra time to setup a displacement map in the action to distort the design to the underlying contours adds that extra bit of realism.

 

The first 4 steps of the action could be removed and would run faster if the clipboard was "primed" with the template image content before running the batch.

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