Skip to main content
Âu Duy Đạt
Participant
November 15, 2019
Question

Changer Image in mockups photoshop. Need coder help me!

  • November 15, 2019
  • 2 replies
  • 694 views

I am using photoshop cc 2019. 

I have one mockup tshirt file and one folder image .png file.

I don't know scripting knowledge in photoshop. I need one scrips help me do it.

This is what I would like a script or action in photopshop to do:

  • For every image in folder
  • Replace smart object with images
  • Save each new mockup (one for each new image) as a PNG file in newfolder.

Sory if it wasted your time. Thank you so much! 

 

This topic has been closed for replies.

2 replies

JJMack
Community Expert
Community Expert
November 15, 2019

An automated process would need to use Photoshop Scripting for actions can not use the logic that would be needed to do the job. Action  only have conditional steps that can test a small set of document and layer conditions.  Also if the replacement images are not exactly the same aspect ratio, sizes and print resolution as the object in the template file you can not use a script that only has support for Replace content for Smart Object layers.  Like the script in the post above this one. You need a script that can edit the templates smart object layers  object to deal with the mismatch files sizes.  Which also means the template  objects must be  an object Photoshop supports.  It Can not be a smart object created using Place to place in files like Camera Raw Files  or vector files like a .SVG or .AI.  For those smart object layer object will open in ACR or an other application like Illustrator. 

 

All Script and Action have dependencies.  Template files must have a layer structure a script was designed to work on and may have other dependencies like mapping Alpha channels.  My mockup script can handle miss matched  sized in one of to ways. Fit the replacement to the object. Images that have the wrong Aspect ratio will not fill the object there will be borders on top and bottom or on both side.  Or the Scripts can fill the object with the replacement image content. Images with the wrong Aspect Ratio will loose some content from the top and bottom  or both sides.  My script will not distort images  to the object aspect ratio. I do not like distortion and would not know to mask the replacement image the script is editing to help out Adobe Content Aware Scale feature. Which also can not do a good job if the aspect ratio difference is large..  I don't support size distortion. A Smart object layer associated Layer transform may warp and distort the object for the mockup.  That Layer Transform is not change.  The smart object layer will be transformed just like the one in the template.

 

Free Photoshop Photo Collage and Mockup Toolkit 

JJMack
Âu Duy Đạt
Participant
November 16, 2019

Thank you! im doing well hehe, but u can teld me how to i changer file save is file PNG not jpg, im use scripts BatchReplaceOneObject. How i can change it ?
Thank you so muck JJMack, you help my life :DD

 

JJMack
Community Expert
Community Expert
November 16, 2019

If you are using my scripts and they don't work its because your templates do not comply with the template design the script are coder to work on.  Did you read the help documentation.  Everything is detailed in the help. Try clicking the help button. The script saves Jpeg files by default but has an option to save  PSD files in addition to the Jpeg file.  You can easily modify the populated PSD file and save  Png files if you require Png files.

 

JJMack
melissapiccone
Community Expert
Community Expert
November 15, 2019
Melissa Piccone | Adobe Trainer | Online Courses Author | Fine Artist
Âu Duy Đạt
Participant
November 16, 2019

thankyou! but action not save file name diffirent. It just save 1 name file  and no changer image in smart ofject

Âu Duy Đạt
Participant
November 16, 2019

Sorry! but u can teld me how to use scripts. i dont know, sorry about that !