3 Replies Latest reply on Feb 7, 2012 12:35 PM by JJMack

    saving with existing filename + prefix

    Will_i_am_99_au

      Hi, I was wondering if anyone could help me as Im not good with scripting.  What im trying to do is take an image and watermark it 3 different watermarks then save it to a specific location using the existing file name but adding a prefex depending on which watermark is on it.  I will be doing this with many images so am trying to automate as much of it as i can.  I have made the actions making each watermark but am having trouble with the saving part as it will overwrite if i use the save as function.  I was hoping I could have the script run the "watermark 1" action then save the file as the existingfilename_watermark1.png then run watermark 2 action and save it as existingfilename_watermark2.png ect.  I also need an unwatermarked image that runs a specific action depending on wether the width is greater than the height.  Im not sure if its possible but i really need it to say if height is greater/equal to 50% of the height run action 1 else run action 2.

      As the function of the script will be the same each time, i was hoping the actions could just run any scripts austmatically without any user input.

       

      Im not sure if any of this is possible but would love any help anyone could give me.

       

      Thanks

       

      Will

        • 1. Re: saving with existing filename + prefix
          c.pfaffenbichler Level 9

          It might be a matter of taste if a Script should trigger an Action or vice versa but I think ideally it should all be done by Script as this might help avoid possible problems when moving to another station.

           

          Im not sure if its possible but i really need it to say if height is greater/equal to 50% of the height run action 1 else run action 2.

          Do you mean 50% of the width?

          What are the exact steps in the size-dependent operation?

           

          then save it to a specific location using the existing file name but adding a prefex depending on which watermark is on it.

          You mean a postfix?

          What exactly is that location?

          What are the exact names of the three watermarking-Actions and the Set/s they are contained in?

          1 person found this helpful
          • 2. Re: saving with existing filename + prefix
            Will_i_am_99_au Level 1

            Thanks for the reply.  yes sorry i did mean 50% of the width.  I was able to manage to patch together a few scripts that save the files as i needed them which are run by actions.  Its probably not the best way to do it but it works and does exactly what i need it to do.  What it does is work out the width of the image then runs through and inserts the 3 different watermarks and saves them in specific directories it makes from the filenames.  it works a treat but i hope it is portable between machines.

            • 3. Re: saving with existing filename + prefix
              JJMack Most Valuable Participant

              Without having to write any script code I think if you download the Plug-in Script "Image Processor Pro" from Rusell Browns web site. You should be able to do most of what you want to do using it. Since your using actions to add the watermarks your always processing un-watermarked images. The part where you want to do one thing when a documents is a landscape and do something else it the document is a potrait can be done with a action that uses a script the will play one action for landscape document and a different action for portraits.

               

              The mage Processor Pro is very flexable when it come to nameing output files where to store them and when to run an action before it save an output image file.  With a single run of the Image Processor Pro plugin you can save all the output files you need to automaticly create for an image. If the do this or do that is for handling watermark placement  you may want to look at my crafuing action package it contains a sample watermarking action that can water mark any size image with watermarks that are size to the image size and positioned where you want them to be.

              Crafting Actions Package Contains

              • Action Actions Palette Tips.txt
              • Action Creation Guidelines.txt
              • Action Dealing with Image Size.txt
              • Action Enhanced via Scripted Photoshop Functions.txt
              • CraftedActions.atn Sample Action set includes an example Watermarking action
              • Sample Actions.txt Photoshop CraftedActions set saved as a text file.
              • 12 Scripts for actions

              Download

              Watermarking example

              http://www.mouseprints.net/old/dpr/WM900x600.jpg