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

want a script to do clip mask of bulk images

Explorer ,
Mar 25, 2016 Mar 25, 2016

Steps that I follow:

1. Open Photoshop – No documents are open. I click “Record” in actions

2. I open my phone.PSD file (which opens up in a tab).

3. I open the .jpeg files (11 files at a time which open up in their respective tabs)

4. I click Ctrl+Tab in my phone.psd tab to move to my 1st jpeg file. I select all & copy.

5. On my phone.psd tab I do paste of my copied jpeg into a layer above my sleeve layer.

6. I then do clip mask to create “Create clipping mask” (the jpeg is now shown on the phone layer shape).

7. I save the work done in the .psd to web -> File -> Save for web -> .jpg

8. I then delete the clipped jpeg layer on my phone.psd file which makes it ready for clipping of next jpeg.

9. I then do Ctrl+Tab to move to the jpeg which I had just clipped & close the tab.

10. Recording ends.


Now, the problem is that whenever I run this batch, the batch runs fine BUT photoshop renames the files with the same name and overwrites the previous clipped jpeg. The end result is that only the last clipped jpeg is available and that too with the 1st jpeg name.

TOPICS
Actions and scripting
2.2K
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 ,
Mar 25, 2016 Mar 25, 2016

That is because you recorded those names into the actions  save steps. If you expand your action you will see the setting you recorded into the actions steps.  Actions are not scripts they can not use logic to retrive information or generate names.  Actions are only able to do hard coded steps.  Only when things like names are not recorded into save actions steps will Photoshop use the current doument backing files names in save step.  When you record the Action and record a save step accept the default name Phoroshop offers do not change it.  If you change the name even if you enter the same name as offered Photoshop will hard code the name in the action step.  If you accept the default name Photoshop will not record a name into the action step. When that action is played in a batch the current document name opened by Photoshop batch process will be the default name and  be used in the save step.

The belongs in the Photoshop General Discussionforum.  Actions are not 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 ,
Mar 25, 2016 Mar 25, 2016

sir. you are great

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 ,
Mar 25, 2016 Mar 25, 2016

Dear JJMack, If we create js code for that action this will work fine? and overcome this particular issue?

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 ,
Mar 25, 2016 Mar 25, 2016

I do not understand what you are doing opening 11 images in tabs.. Batch jobs are normally done with no open images where the Batch process opens one image process it savina as many image file as required for the image then the images is closes the batch process moves on to the next image to be processed .  This is done using menu File>Automate>Batch, or menu  File>Scripts>Image Processor. There are also download like the Plug-in Image image Processor Pro which will be access via menu File>Automate>Image Processor Pro once installed.

There are other scripts you can download that will process multiple image into output document like one found in my Photo Collage Toolkit.

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 ,
Mar 27, 2016 Mar 27, 2016

Hello, I just want to rename my phone.pdf file when I copy image for clipping mask and paste this image to phone.psd file I want coped image name to be rename my phone.psd to whatever my image name which I have copied and clipped to phone.psd

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 ,
Mar 27, 2016 Mar 27, 2016
LATEST

You can not change the name of a document opened in Photoshop that document's Name is Read only. However you can save out new files with whatever name you want and be whatever file type Photoshop supports. If your inserting a single image into a template it is easy to save output file types the the inserted image in the file name. I believe in my Batch one image collage populating script the Output File names I generated consist of the Template name and the Images name.  However for collages that have multiple images inserted I name the output files Template Name and a CollageNumber.

I always save the output as a PSD file so it can be tweaked.  The populated Collage can also be optionally saved as a Jpeg and PDF.  The Image Layers can have a layer style added.  The Place in image is sized for the area and masked to the area shape.  The image File name can also  be added as a text layer that can be in one of nine location on the placed in image or if it a single image collage the text layer can optionally be positioned to the document canvas in one of nine positions.  The text layer font can be selected and a layer style added to the text layer. The Batch one image collage scripts dialog look like this.

Capture.jpg

a sample output actually two I inserted the Basball collage card generated into a Time Collage I populated.

JJMackTime.jpg

Photo Collage Toolkit

Photoshop scripting is powerful and I believe this package demonstrates this A video showing a 5 image collage PSD template  being populates with images:

The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.

  1. Size the photo collage templates for the print size you want - width, height and print DPI resolution.
  2. Photo collage templates must have a Photoshop background layer. The contents of this layer can be anything.
  3. Photo collage templates must have alpha channels named "Image 1", "Image 2", ... "Image n".
  4. Photo collage templates layers above the background layers must provide transparent areas to let the images that will be placed below them show through.

There are fifteen scripts in this package they provide the following functions:

  1. HelpPhotoCollageToolkit.jsx - Online Help
  2. TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
  3. CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
  4. LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
  5. InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
  6. ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
  7. ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
  8. PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
  9. BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
  10. BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
  11. PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
  12. BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder.  Images Rotates for best fit.
  13. BatchPicturePackageNoRotate.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder.
  14. PopulatePicturePackage.jsx - Used to Automatically populate a Photo Collage template Fill with the same single image and leave the populated copy open in Photoshop.
  15. PCTpreferences.jsx - Edit This File to Customize Collage Populating scripts default setting and add your own Layer styles.

Documentation and Examples

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