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

How can I automate the placement of different images onto a background?

New Here ,
Jan 08, 2020 Jan 08, 2020

I have a background image that I want to individually place 100s of images on, individually. The background is a photo frame, and I have a lot of photos that I want to each be put in the frame and saved individually as a JPEG.

 

I'm familiar with Photoshop's batch automation, but can't figure out how to do this.

 

Thanks in advance.

TOPICS
Actions and scripting
5.1K
Translate
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 ,
Jan 08, 2020 Jan 08, 2020

Oops, wrong topic!

 

Many topic threads discuss this, but the new forum software search is not great!

 

Edit: Here is one such previous topic thread, there are many to be found. You should be able to use a custom built action (helper scripts may be required) or one of JJMack’s template scripts:

 

https://community.adobe.com/t5/photoshop/how-to-automate-batch-merge-2-images/m-p/10373314#M233731

Translate
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 ,
Jan 08, 2020 Jan 08, 2020

You have a couple of options: photoshop actions, scripts, data driven graphics. Perhaps it is easiest for you to record action for batch process. Action can do the following: place frame above each of the images in batch process for what you need frame with transparent areas and a couple of other requirements like aspect ratio of frame to match aspect ratio of images.

Another option is to record action which will copy batch open image, paste it into another document with frame, copy frame with image then paste back into document with image open in batch process. This is more difficult and you need some experience in order to make things work.

Translate
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 ,
Jan 08, 2020 Jan 08, 2020

Templates PSD file and Photoshop scripts 

 

JJMack
Translate
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 ,
Jul 01, 2024 Jul 01, 2024

Wondering how to change the script to work on the image size to be square 335px x 335px with 1 to 3 per row?

iampurple_0-1719876584281.png

Thanks

Translate
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 ,
Jul 01, 2024 Jul 01, 2024
quote

Wondering how to change the script to work on the image size to be square 335px x 335px with 1 to 3 per row?

iampurple_0-1719876584281.png

Thanks


By @iampurple


Unfortunately, JJMack has since passed on.

 

Can you share a PSD sample of your template?

 

Translate
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 ,
Jul 01, 2024 Jul 01, 2024

Hi @Stephen Marsh, thanks a lot for quick replied. I think I can try one more time to see if it works.
Wondering is there a way to have a photoshop template created for the users to use the google spreadsheet to generate image out on their own?

thanks

Translate
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 ,
Jul 01, 2024 Jul 01, 2024

The native method from .csv spreadsheet data is Image > Variables... AKA Data Driven Graphics:

 

https://helpx.adobe.com/au/photoshop/using/creating-data-driven-graphics.html

Translate
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 ,
Jul 01, 2024 Jul 01, 2024

I thought of this, but for the users who doesn't know how to use photoshop and no photoshop account. 

Translate
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 ,
Jul 01, 2024 Jul 01, 2024

Then you need to look into the Photoshop API or other "Web to Print" systems on the market.

Translate
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 ,
Jul 02, 2024 Jul 02, 2024

thanks a lot!!

Translate
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 ,
Jul 02, 2024 Jul 02, 2024
LATEST

Hi @Stephen Marsh, would you help to take a look script, I tried to add the margin 15px left & bottom for stamp filename on image? like this

iampurple_0-1719939182441.png

function stampFilename(textFont,sizeFactor,textColor,Name) {
        /* textX and TextY positions text placement 0 and 0 Top Left corner of image in pixels */
var textX = 0;
var textY = 0;
/* END Variables hard coded */
 
var txtWidth =  app.activeDocument.width * .90 ; // 90% of Doc with
var txtHeight = app.activeDocument.height * .90 ; // 90% of doc height
 
activeDocument.selection.deselect(); // make sure no active selection
text_layer = activeDocument.artLayers.add(); // Add a Layer
text_layer.name = Name ; // Name Layer
text_layer.kind = LayerKind.TEXT; // Make Layer a Text Layer
text_layer.textItem.color = textColor; // set text layer color
 
/* Do not set TextType to Pargarph so the layer can be aligned
  text_layer.textItem.kind = TextType.PARAGRAPHTEXT; // Set text layers text type
  */
 
text_layer.textItem.font = textFont; // set text font
text_layer.blendMode = BlendMode.NORMAL // blend mode
text_layer.textItem.fauxBold = false; // Bold
text_layer.textItem.fauxItalic = false; // Italic
text_layer.textItem.underline = UnderlineType.UNDERLINEOFF; // Underlibn
text_layer.textItem.capitalization = TextCase.NORMAL; // Case
text_layer.textItem.antiAliasMethod = AntiAlias.SHARP; // antiAlias
    textLayer.textItem.position = [15, doc.height - 15 - textLayer.textItem.size];
 
 
/* Calulate font size to use for keep size same for landscape and portrait base on text area size */
if (txtWidth >= txtHeight) {var fontSize = Math.round(txtHeight / (30 * sizeFactor));}
else {var fontSize = Math.round(txtWidth / (30 * sizeFactor));}
if (fontSize<14){fontSize=14}; // don't use Font size smaller then 10
text_layer.textItem.size = fontSize; // set text font Size
 
text_layer.textItem.position = Array(textX, (textY + fontSize )); // set text layers position in and down for Stamp add in fontsize
 
// Do not set Text Area so so the layer can be aligned
 
text_layer.textItem.contents = Name ;
}

 

also, why it generated out the image bleed to bottom, there is suppost to have a margin at the bottom?

iampurple_1-1719939345548.png vs 

iampurple_2-1719939381990.png

 

 

thanks

Translate
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