Skip to main content
Marinapomorac
Inspiring
April 4, 2021
Answered

Combine two set of images in two folders transparent PNG over background - batch export

  • April 4, 2021
  • 4 replies
  • 12730 views

I am 100% sure this is already explained but I do not know what I should type in a search to get to the result.

 

I have 500 PNG transparent images in one folder named Image (1) Image (2) Image (3)... and 500 background JPG images in another folder named Background (1) Background (2). All images are the same dimensions. 

I want Photoshop to take:

Image (1) and put it over Background (1) and export

Image (2) and put it over Background (2) and export

Image (3) and put it over Background (3) and export... and so on the entire folder.

 

I have to do this a lot so my plan was to get a folder of PNG and JPG and duplicate that, rename it (and for this to be as easy as possible I went for images in folder one with renaming everything in to "Image" which gives me results Image (1) Image (2)... and the other folder Background which gives me results background (1) Background (2)... if I do this then my Photoshop action will always work since the names of the photos will always be that, I think?

 

How do I achieve this?

 

The PNG files should be created from an Excel file.

 

I have an Excel file with text in 2 columns.

One is the TERM name and the other column is the definition.

 

I am trying to figure out how to set Photoshop to batch export transparent PNG using the text from the EXCEL (see image).

 

And then combine them with the background image. 

 

I do not want to do this in one action because I will combine transparent PNGs with different backgrounds. 

 

Any help?

 

Thank you.

 

 

 

 

 

 

 

This topic has been closed for replies.
Correct answer JJMack

But I did use Paragraph text? 

 

The images I am sharing here in the topic are created from a file that has both text fields set as paragraphs.

 

In the upper one the title is OK, it is aligned to the right so longer and shorter words are fitting, but the lower text is all over the place and it should be on the bottom. 

I used this file to create images. 

 

 

 

 


I have never used Data Driven Graphics.  What you Posted looks like a contact sheet of your Data Driven Graphics output Jpeg Files.  Can Data Driven Graphics output Layered PSD files?   If it can you should be able to align the bottom text paragraph text layers the way you want them aligned.  You may be able to automate that process with Photoshop script you write. It depends on Data Driven Graphics being able to  save layered PSD files and then on how well you can script Photoshop.

 

If the Paragraph Text layer is the top layer in your template a Batched action may be able to align your text the way you want it aligned.  here are screen captures of the steps required.

4 replies

Marinapomorac
Inspiring
April 4, 2021

Things I solved:

a) how to merge PNG and JPG

I created PSD file with two layers, I called one JPG and the other one PNG. Then I created Excel file with two columns JPG and PNG and names PNG (1).png PNG (2).png and so on. Then I exported it to .text. Created variable PNG and JPG and data set from variable merged two files from folder. It is important that PNG JPG and .text are in same folder.

I run the batch and got a lot of psd then run script Image processor to convert all to jpg. 

 

b) Excel batch export - same as above just with text layers

 

c) unresolved - how to fix text to bottom

Participating Frequently
April 4, 2021

If I understand you correctly...Look up variables and data sets, I believe that will work for you.

Marinapomorac
Inspiring
April 4, 2021

Yes, I solved that.

 

Now the issue is text aligned on the bottom right in the paragraph text so it doesn't get chopped off.  

JJMack
Community Expert
JJMackCommunity ExpertCorrect answer
Community Expert
April 5, 2021

But I did use Paragraph text? 

 

The images I am sharing here in the topic are created from a file that has both text fields set as paragraphs.

 

In the upper one the title is OK, it is aligned to the right so longer and shorter words are fitting, but the lower text is all over the place and it should be on the bottom. 

I used this file to create images. 

 

 

 

 


I have never used Data Driven Graphics.  What you Posted looks like a contact sheet of your Data Driven Graphics output Jpeg Files.  Can Data Driven Graphics output Layered PSD files?   If it can you should be able to align the bottom text paragraph text layers the way you want them aligned.  You may be able to automate that process with Photoshop script you write. It depends on Data Driven Graphics being able to  save layered PSD files and then on how well you can script Photoshop.

 

If the Paragraph Text layer is the top layer in your template a Batched action may be able to align your text the way you want it aligned.  here are screen captures of the steps required.

JJMack
JJMack
Community Expert
Community Expert
April 4, 2021

You may be able to this wit a mockup template and a script whene you rename the png and background jpg like you stated you did. so image and background sort in the same order and match up.  An action cam olet doe the smage bymvet of filese the bate  would always net to contain the same number of images the names recorded in the action steps.  A script cans process folders of images in file sort order.  The two fouler just need to have the same number of images,  The Batch mockup scripts in my toolkit can populate such a mockup.  Or you may be able to use a Photoshop Data driven template with your  excel CSV  file.

 

There may be a problem using PNG file that has transparent background where  boarder area are completely transparent.  Photoshop features like Place and Copy/Paste I believe will trim you png images transparent boarders. Png image layer bounds will be smaller than canvas size and may have a different Aspect Ratio then the background layer. If you need the transparent border for the PNG and JPG  to align correctly.  You mare need to edit your PNG First.   An action can be batch to add two 1% gray pixels to the png images one in the top left corner the other in the bottom right corner to eliminate Fully transparent boarders.  No one would see the pixels with their eyes.

JJMack
Marinapomorac
Inspiring
April 4, 2021

OK. Let's see do I understand you correctly.

 

To separate two of my questions I will now talk about merging PNG and JPG.

 

You are saying that when I create PNG files I should create PNG files by setting background (layer) with 1080×1080 dimensions with 1% grey dots in corners. 

 

Then I merge them (somehow) with a background that is JPG file 1080×1080 and then PNG and JPG will merge as is.

 

And merging of PNG and JPG as batch (yes both folders will have a same number of images) is possible in Photoshop, I just have to figure out how. 

 

I do not use scripts, never had and I do not know how.

 

Second question Creating PNG from Excel

 

I was thinking it is possible in Photoshop to set TEXT 1, TEXT 2 and TEXT 3 on Artboard, set once again background layer with 1% grey in corners, set the font and styling and then ask Photoshop to take text from EXCEL CSV .text exported column 1 and put it in place of 1, column 2 on 2 and column 3 on 3 and export as PNG files. 

So no merging, just export as PNG with different text. 

 

I will keep the names of the columns always the same, just change text data. 

 

Is this possible?

 

 

Kukurykus
Legend
April 4, 2021
Marinapomorac
Inspiring
April 4, 2021

Thank you for responding. I see on the link code for opening separate images as layers. I do not want to open them. 

 

I just want to merge them. Merge transparent PNG over background JPG and saved as JPG. And for Photoshop to do that for the entire folder, all images in the folder.

 

This is what I have in two folders in the attachment. 

 

I want Photoshop to merge them all individually 1 with 1 2 with 2...

 

Kukurykus
Legend
April 4, 2021

Yes, that was something similar I made last days I had still in memory you can use somehow.