i wanted to create an action in photoshop to draw a rounded rectangle frame with 40 px distance from each side of the document that works for both square and landscape documents. i have tried creating a rectangle frame using documents dimensions and then turn that simple rectangle into a rounded rectangle using selection tool but it will not work when document sizes vary. can someone tell me how can i perform such task? thanks.

  • You can only use static values in actions, unless you mix in a script to do that part. In some cases you can get around it. I'm not sure if I was able to get the whole picture, but this answer might help.
    – Joonas
    Jan 16, 2017 at 18:46

2 Answers 2


Create a new Action.

Select all.

Menu: select>>modify>>contract:40px.

Menu: select>>modify>>feather:50 (or any value you desire).

Go to Paths panel and create a work path. In the same panel: Make selection.

Invert the selection. Ctrl + i .

Go back to Layer panel and hit Ctrl + Shif + n , this will creat a new Layer.

Now hit Shif + Del and fill it with any color you want, finishing your frame.

Stop the Action.

Now you have your desired frame.

This Action can be reused in any paper size.

  • select all
  • modify the selection to be a 80 px transition border Select > Modify > Border
  • invert the selection Select > Inverse
  • open dialog Select > Refine edge
  • adjust Smooth to a high value (defines the rounding)
  • adjust Contrast to 100% (unfeathers the transition area)

Now you have the wanted rounded rectangle as current selection. That can be used like any selection to limit floodfills, effects etc... or it can be converted to a path.

Unfortunately contrast 100% does not remove all feathering. If too much is left, then refine the edge twice.

To get for ex. 20 pix wide border strip you can fill the selection, Modify it 20 px smaller (Select > Modify > Contract 20 px ), Refine to have rounded corners, if needed and delete the mid part by DEL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.