Skip navigation
Currently Being Moderated

Record actions, like macro to repeat process

May 6, 2013 10:30 AM

Tags: #automatic_process

I want to crop several images to size, then add a white boarder, a drop shadow and a stroke. Is there a way to automate the process, so they are all exactly the same?

 
Replies
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 6, 2013 10:36 AM   in reply to mikecox_

    Yes

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 6, 2013 10:56 AM   in reply to JJMack

    I bet you want more then a yes. More information on exactly what you want to do is needed.  To be exactly the same images must be cropped to the same aspect ratio or masked toe the same aspect ratio and sized to sized the same resolution. Do you want each in its own file or a conposit.   For a composit a very small mod to my PasteImageRoll script to add drop shados layer styles to image layers. Could handle as may images as you have in a folder regardless of their file format.   Paste Image Roll Script

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 6, 2013 2:44 PM   in reply to mikecox_

    I understand what you wrote but what you have written is very ambiguous.  I understand your  not cropping  the image instead your in increasing the document canvas size and in a way make makes the canvas aspect ratio 4:5 which is the same aspect ratio a 8" x 10"  Portrait print has.  I understand you then add a stroke outside the image and a drop shadow to image copy layer using a layer style. 

     

    I do not know if  you intend to that to all possible image sizes aspect ratios and orientation. I haven't the fantast idea about any of you source images pixel sizes and aspect ratios and orientation.  You do not state how much canvas you want added. I also don't understand why you then need to close down Photoshop only to then open Lightroom to print the image you just save in Photoshop why not just print using Photoshop and save time. You wouldn't even have to save print size image file unless you need them for something else in the future.

     

    Like I don't know anything about your image source files an action would also have no idea either unless it was created to process a single image size.  I can use  logical and use tools to learn and use size information. Actions can not use logic scripts on the other hand can.  

     

    Also you need to be very careful when using Layer styles in Actions.  Layer styles can not be recorded is a relative way.  The setting in layer style are in absolute pixel size.  A layer style create for a print size image will not look the same if you add it to small image intended for the web.  The number of pixels use to add a drop shadow in a print will be way to many pixels to add to a web size image. This is why the are special options in Photoshop to scale layer styles when resizing image and to adjust layer style added that just does not look like it should scaling it can often fix that up.

     

    If it is your intent is to create actions that will work on just about and file you need to craft the action well.  You can not do that when your first learning to record actions. You need to know how to use Photoshop well and have a very strong knowledge of how digital images are manipulated. This knowledge does not come to you overnight.  You develop  it over time. 

     

    I have a lot of experience creating actions.  To try to help others get up to speed I put together a package however I do not to text well I failed every English course I ever had to take and American English is my native tong.  Still I feel what I have put together is well worth looking at.  And it come with some utility script I wrote to be used within action. With these you can do things in actions that would otherwise be impossible.

     

    Crafting Actions Package  UPDATED Aug 14, 2012 Changed AspectRatioSelection Plug-in script added Path support.

    Contains

    Example

    Download

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 7, 2013 8:07 PM   in reply to mikecox_

    Let see

     

    1. I have 4 jpg images in Ps work area, all the same size.

     

    Now I know you have flat JPEG a single background layer and I now know all file  contain identical size images that means the action does not have to handle image  of varying size and aspect ratio all it need to know is the size image it will be working with.  Without that information it will be hard to tell you how to record some steps you will need to record.

     

    1. I will edit each image, one by one; but...
      1. I want to automatic the process, so I don't have to edit them, one by one.

    That is what menu File>Automate>Batch and menu File>Scripts>Image processor is all about

     

    1. This is what I will do to the first image
      1. Make a copy layer
        1. So I have a background layer, with a copy above it

    Yes I understood that  and it is what you will do to all your image not just the first one.

      1. I will Crop the background layer to a size larger then original image
        1. This creates a boarder around the original image on the background layer
        2. I will then fill that background layer with white

    That is not cropping that is increasing the documents canvas size.  With a single menu Image>canvas size you can add the canvas and color it for you know the image size and the amount of canvas you want to add.  I do not know the image size you dealing with all I know is you want to add some canvas and that final canvas size will have a 4:5 portrait aspect ratio so you can print the document 8" x 10". All you need do is to record an step menu Image size after you add the canvas and un-check the resample checkbox and set 8" into the print width and click OK.

      1. I will then click on the copy layer above the white background layer

    It is best to record that step by selecting the layer in a relative manner like select layer forward or select front layer rather then clicking on the layer which select the layer by name.  It a good habit to get into when recording actions you can not always count on Photoshop generating the same file name.  However in this case where you dealing with flat jpeg file the layers created by duping the background layer with Ctrl+j or dupe layer will most likely always generate the same layer name for the background copy. You also may not have to select this layer it will become the current layer when you create it however I do know if the background layer will become the current target when you increase the canvas size.  It may I just don't know off the top of my head.

     

    1. I will apply the following layer styles to that image
      1. Drop Shadow
      2. Stroke

    since all image images are the same size and will have the same amount of canvas added and be printed at the same size and resolution that not a problem just record the step.

     

      1. The result with be a layer inage, with a white boarder, and an image with a drop shadow and a stroke; I will then

    There is no need to flatten the or even save the image the Image processor can do that for you.

    You can also just record a save as Jpg step where you set the jpeg quality and have the Batch processor override the other setting in the save as step the image doe not need to be flattened first and as of CS6 can be edited in 16Bit mode Photoshop will save the jpeg file in 8bit mode.

    1. flatten the layers
    2. save the file as a jpg.
    3. go to the next image and do exactly the same think.

     

    Yes as I wrote that is what Batch and the image processor is all about.  You batch a simple action or add a simple simple action to the Image Processor processing.  They take care of opening and saving and saving files. They can also work with open document in Photoshop.  You do not have to get the file into Photoshop yourself.  You can select files in the bridge you can preprocess a folder or tree  of image files with Batch and the Image processor.  From the bridge you select the thumbnails the use the bridge's menu Tools>Photoshop>Batch or Tools>Photoshop>Image Processor.

     

    1. The questin is; How do I automate step 2, so I can avoind step 4.3

    You do 2 by using the menu File>Automate>Batch or use a script like menu File>Script>Image Processor.

    4.3 is 2.

     

     

    I just did some testing.

     

    Step one dupe the background layer the new layer will be the current Photoshop target selected layer

     

    Step two use image size uncheck resample as set the width to something like 6"  Photoshop will set the documents DPI so it will print 6" wide and the height to less then 10" high If the height is greater then 10" set the height to 8" the width then will be less then 6" click OK.

     

    Step three Menu Image>Canvas Size.  Leave the anchor point in the center and set width to 8" and height to 10" set the canvas color you want to add click ok.

     

    Step 4  the current target is still the new copy so just double click on the current layer and add the stroke and drop shadow style.

     

    That should do the trick.

    Batch.jpgip.jpgipp.jpg

     

    Message was edited by: JJMack

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 9, 2013 4:50 PM   in reply to mikecox_

    mikecox_ wrote:

     

    From there I go to Lr and print them on an 8x10 sheet.


    mikecox_ wrote:

     

    all it need to know is the size image it will be working with

    Let me just answer this question before I conitiue with your  post.

     

    Final size will be 5.5 x 4.25.

    Now I'm confused 5.5" x 4.25 is a landscape aspect ratio

     

    No matter you know the sizes you want all you need to is stick those numbers in the four step I gave you

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 10, 2013 6:28 AM   in reply to mikecox_

    Mike not for nothing  your finally describing what you want to do.  You want to print 4 image on a single sheet of paper. Why in the world didn't your write that in the first place.  Disregard everything I have written so far.  For I  had no idea that is what you wanted to do.  Before I write anything more can you tell me why you want to involve both Photoshop and lightroom in your process. All can be done just using Photoshop.  Most likely Lightroom could also do the whole process since your not doing any image editing. Personally I do not use Lightroom for I don't need the power of its library system for orginazing my images.  For me lightroom would just be an addtional expense for what I do its not needed.

     

    That's the standard postcard size used by Avery?? Are you using Avery paper that seperates into four postcards?  With postage or addressing info on the back side?

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 10, 2013 9:15 PM   in reply to mikecox_

    mikecox_ wrote:

    Because I have a print template set up in Lr, that is calibrated with my monitor and all I have to do  is put the 4 images I create into a folder then open it in the Print module and the images fall right into place; readyfor printing.  My goal here was to simply automate the creation of the four images; not to print them.

     

    Ok I see.  Yes the only thing I could give you for Photoshop would be a PSD template file and a Photoshop script.  If you put your image files into a folder any size, any resolution, any image file format that Photoshop supports RAW, Layered flat. What you would then need to do is use menu File>Scripts>Script name.   Fill in the script's dialog to point to the template file, to point to you image folder, to point the your folder you want the print document saved and optionally set the options  you want to use and click create let it rip.  Take a coffee brake.  Let say you put 400 images into your image folder.  When your coffee break is over you will find there are 100 document with four images each ready for print in your print folder.  If one of the options you checked was to also save jpeg files you could print those using Lightroom if not you would need to print the PSD layered version using Photoshop.

     

    Mike when you ask a question even if you have some idea of what you will be doing the forum users can only give you good advice when they know what you want to do. Now I have a question what do you mean "have a print template set up in Lr, that is calibrated with my monitor".  Your monitor should be calibrated.  Your template just need a color profile you want to use for printing.  You may also want to calibrate your printer. Template Files and Lr are not calibrated they use or have icc profiles..

     

    Message was edited by: JJMack

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 11, 2013 3:49 AM   in reply to mikecox_

    Yes Mike I'm well aware of my poor communication skills.  I'm 72 failed every English course I ever had to take can not type or spell.  Its the way my mind is wired.   I try hard and do the best I can. I did not miss understand you.  You just did not provide needed information.

     

    I do logic and Photoshop much better.  You do not need to learn Photoshop scripting or write any. Most Photoshop users never do.  You did not program Photoshop you use Photoshop.  Photoshop ships with some Photoshop scripts that users use all the time.  Like the Images Processor, Photomerge, Contactsheet  and others.  Users likely don't even know they are using a script.  Scripting is more powerful automation freture then actions  they can automate Photoshop process impossible in an action.

     

    Some Photoshop user have skill sets others do not have.  While I can not type, spell and don't know scripting well I understand how many thing work and can hack at thing even get them working that put things.  It just take me more time then it would others.  For computers don't like typos and spelling errors so I have a major problem, but I carry on.  What I create I make available to others.  The price they have to pay is understanding what I write.

     

    Using Photoshop's data drive variables feature you can populate templates you create and define variables in.  You can do thing many different ways in Photoshop.  There is no one right way to so something in Photoshop there are many. Contactsheet, Picture Package  and other all can layout your images. 

     

    My Photo Collage Toolkit How about a fifth image on top like this:

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

     

    Or a layout like this:

    http://www.mouseprints.net/old/dpr/PngSoccerball.png

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2013 5:48 AM   in reply to mikecox_

    Mike,

     

    Record an Action then run that with Batch command. Batch will automatically open and save & close the files if you do not enable its options to "Override..." opening and saving steps in Actions.

     

    Action:

    1. Layer > New > Layer From Background.

    2. Image > Canvas Size, specify required size such as 5 x 4 inches.

    3. add stroke and drop shadow.

    4. Layer > Flatten Image.

     

    Screen shot 2013-05-11 at 13.45.38.png

     

     

    There is no need for an explicit step of creating a white background; the Flatten Image command will do that. However, you are at liberty to add one when you're recording the Action so you can accurately judge the drop shadow.

     

    You may want to add a fnal step of 'Save As' where you can specify particular JPEG settings. Then you would enable 'Override Action "Save As" Commands' in the Batch dialog.

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 11, 2013 6:26 AM   in reply to conroy

    Conroy I know you know Photoshop very well.  So if you look at what you have posted you should see you forgot one step.  You need to first set the original image print size so it will be some what smaller then the desired canvas size. Otherwise when you change the canvas size the image will be a virtual crop or the image may be small on the canvas.   I tried to cover the steps needed in append 6 above and showed the batch dialog.  Dealing with size in actions can be quite difficult if the source images can be any size and aspect ratio. However Mike wrote all his images are the same size.

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2013 6:57 AM   in reply to JJMack

    JJ, I tested before posting. The Action I posted works on my computer. It's intended to address Mike's specific problem and is not intended to be a general purpose utility for all possible scenarios.

    I think we can safely presume that Mike's input images are smaller than the size to which he wants to expand the canvas since he does want to expand the canvas to a specific size.

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 11, 2013 6:59 AM   in reply to conroy

    Yes your action will work well on images files that are 4"x3"  will not work on 6"x4" images. I would not presume anything about Mikes images. I  think he is new to Digital image processing and learning.  We all were there once...Right.

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2013 7:04 AM   in reply to JJMack

    You are beyond belief, JJ. Here is what you stated yourself in reply #6

     

    "Now I know you have flat JPEG a single background layer and I now know all file  contain identical size images that means the action does not have to handle image  of varying size and aspect ratio all it need to know is the size image it will be working with."

     

    Now you're saying I'm wrong to assume the very same thing that you allow yourself to assume!

     

    Give it a rest, please.

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 11, 2013 7:33 AM   in reply to conroy

    Conroy I never stated you were wrong.  I stated Mike is new and learning that I would not presume anything about Mikes images.   Conroy you did not read this thread it took several appends to get that information from Mike.   Even if your action works perfectly for him.  We do know if the file created will be ths same resolution as his lightroom template and fit in correctly. Then again maybe LR would handle any mismatch of resolution. I don't know I don't have LR.  I know how you react I feel it a shame for you have some much knowledge to share.  You do not have to defend your written word and you don't need to teach me any more then I need to teach you we can find out what we don't know. I'm trying to help Mike.

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2013 8:48 AM   in reply to JJMack

    JJMack wrote:

     

    Conroy I never stated you were wrong.

     

    You said I had forgotten to put a step in my Action. You said I shouldn't have presumed anything (although you allowed yourself to make the very same presumption).

     

     

    JJMack wrote:

     

    Conroy you did not read this thread it took several appends to get that information from Mike.

     

    Hey, don't tell me what I haven't read! Of course I read the whole damned thread. That's how I was able to attempt a solution based on the info revealed by Mike. Is that a problem for you?

     

     

    JJMack wrote:

     

    You do not have to defend your written word

     

    I choose to defend my writings when someone (you in this instance) says I have forgotten something or made a wrong presumption. Is that another problem for you?

     

     

     

    JJMack wrote:

     

    you don't need to teach me any more then I need to teach you we can find out what we don't know. I'm trying to help Mike.

     

    I wasn't trying to teach you anything. I made a post directly addressed to Mike. The first line was: "Mike,". You were the one who responded with an attempt at "teaching" me.

     

    Will you back off!!!

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 11, 2013 9:13 AM   in reply to conroy

    Typical what a shame...

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2013 12:49 PM   in reply to mikecox_

    You're welcome!

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 11, 2013 1:20 PM   in reply to mikecox_

    Mike the forum does have a spellchecker a very poor one.  I wish it did not have it for it prevent my spellchecker from working.  If you look you will see a ABC with a check mark in the menu above your imput that how you use it.  However it does not fix typos if just fixes some spelling errors.  I often just hit the wrong key a letter to one side or the other.  That it can not fix and it prevent you from position the cursor to the incorrect  letter for when it on it take over the left mouse button you have to turn it off first or retype the whole where I'm just as likely to make a type. I have a problem. I do the best the I can. The spellcheck make my problem even harder.  Its not very useable. Then there are typos that sell valid words like nor where I wanted not r is next to t.  It a visual thing and a communication thing.  I did read that before posting.   As I wrote I have a problem.

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2013 1:33 PM   in reply to JJMack

    JJ, maybe you've forgotten the solution that was suggested some months ago when you complained of being unable to use your preferred spellchecker in this forum. Type your response in Notepad or wherever your checker works, then copy & paste or drag it into the forum reply box.

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 11, 2013 2:43 PM   in reply to conroy

    Conroy thank you I did not forget. Its more then just typing.  The problem is deeper then that. More basic then that.  I do not do text well read that communicate well writing or even read it.  It take me for ever to come up with a simple easy to understand sentence.  Then there are all those commas  quots and symbols.  The one scripting language I like is Rexx.  I wish it was support by Photoshop. Its very lax and forgiving suits me well.  Javescript is hard for me for if is if If is not if. Rexx knows If is if why can't javascrip understand that. A regular expression is all but impossible for me. What kind of syntax is that anyway my eyes cant decyper them.   However I not going to take my life or stop trying to help other. While many may have a problems with how I write they also know I'm trying to help and some have even been helped.  You and I have made about the same number of appends we both have three +++.  The big difference is took you a fraction of the time to type your 3,000 appends then it took me.  And your were easier to read.  

     

    Let me write again. I know you know Photoshop well and have Extended and other Adobe Product. You know may things I don't.  I don't need illustrator or indesign. Nor do I want spend the money or take the time to learn them. I'm 72 time to relax a bit but keep my mind working not overtax it.  I have never intend to upset you. Or say you are wrong. However if I feel you left something important out or feel your information may be confusing someone. I will write something. Plesae try not to take them as attack on you there not.  I have problems of my own I don't need you on my case too..

     

    This append took about an hour or more for me to do.  Maybe you can understand me a little better now.

     

    I wrote you did not read the thread you may have you many have aslo missed it took me several append to get information from mike I made no assumptions I asked for information but that confuse mike for he thought he had communicate what he was doing well. It easy to understand that he knew what he wanted to and thought what he wrote explaine that well. Then he finally wrote he wanted to print 4 image on a single sheet.

     

    Message was edited by: JJMack

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2013 2:56 PM   in reply to JJMack

    Write fewer words if writing is so difficult for you. Maybe 90 percent fewer.

     
    |
    Mark as:
  • JJMack
    6,057 posts
    Jan 9, 2006
    Currently Being Moderated
    May 11, 2013 3:28 PM   in reply to conroy

    Writing something that convey all the info in a few words is a very difficult task for me that part of the problem.

     

    Mother nature deal each of us a hand for some she stacks the hand with many Aces. Mine she short suited voided and long suited.  Not always the eaiest hand to play with.

     

    I've been here longer the you yet you have a 1,000 more point the me.  You write better for sure.

     

    Message was edited by: JJMack

     
    |
    Mark as:
  • Pierre Courtejoie
    7,060 posts
    Jan 11, 2006
    Currently Being Moderated
    May 13, 2013 2:11 PM   in reply to JJMack

    Glad that you guys came to understanding. Both of you are very helpful in these places, each in your own way!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points