I am currently trying to create a batch action in Photoshop CS3 to

  1. re-size the canvas on images of varying dimensions and
  2. insert a text box in the new space at the bottom of the image created by the canvas resizing.

The primary problem is the varying dimensions of the images. I can use relative positioning for the canvas re-sizing, but I am stuck on how to create the text with the correct dimensions (vertical will be the same, but horizontal may vary) and then position the text box at the bottom, either using some sort of 'coordinates = max value' (for referencing the lower right hand corner); or (0, max value) for referencing the bottom left hand corner. I suppose I would also need to specify which corner of the text box I am aligning it to (perhaps with the Transform tool?).

To sum it:

  1. How do I create a text box in an action with a set vertical value and a horizontal value equal to the horizontal dimensions of the canvas?

  2. How do I reference the "maximum value" using the coordinate system?

I am trying this in Photoshop CS3, but if you think another CS3 product with action functionality is better suited for this task, please let me know. I know Photoshop dropped some of its support for coordinate positioning in favor of its snap-to features.

(I have seen a related post at: Can I transform an image's location in a Photoshop action so that it's relative to the canvas and NOT the image? - but I'm not sure this is the solution to my problem).

  • This seems beyond the capabilities of a recorded action to me, but I've never stretched that tool very far. I'm also not terribly familiar with Photoshop's javascript library but I know it's more limited than InDesign or Illustrator. Have you considered either of the other two apps? With javascript you could most certainly do what you're after. Commented Dec 30, 2012 at 4:36
  • This needs to be done through scripting, it seems too advanced for actions. If you happen to know JavaScript you can dig through Photoshop's API and script something that can work for you.
    – Hanna
    Commented Dec 30, 2012 at 4:55
  • By "vertical value" and "horizontal value" do you mean height and width or something else like Y position and X position? Either way, it should be easy to do with Photoshop scripting. Commented Dec 30, 2012 at 7:27

1 Answer 1


Canvas Flip

Positioning in Photoshop uses 0, 0 as the top left. So, if you want to position an element from the bottom left, there is a way — You can flip the canvas, position the element, flip the entire canvas back, then flip the element. It's not ideal, but it'll give you positioning that's relative to the bottom left.

  1. Resize and/or edit the canvas size, adding black to bottom.
  2. Image → Image Rotation → Flip Canvas Vertical.
  3. Place text element top left.
  4. Image → Image Rotation → Flip Canvas Vertical.
  5. Edit → Transform → Flip Vertical the text element.

Done. All without scripting, too!

There's possibly quite a few other ways to do this, like creating a selection that's the full document, making a new bitmap layer, filling, then using that to select a few elements and flipping. I think the method listed above might be the easiest and quickest though.

Align Layers to Selection

Mark Aplet (@visual28 on Twitter) suggested another great solution: Align Layers to Selection lets you align a layer to a selection. And creating a selection of the entire document is easy and actionable with Select All, so we can align objects to the base of the document, then nudge up from there.

This is probably the better way to go.

Align Layers to Selection

  • Very creative work-around.
    – Hanna
    Commented Dec 31, 2012 at 2:43
  • Just added another suggestion from @visual28 on Twitter. It's a good one. Commented Jan 1, 2013 at 5:32

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.