Advertisement


Photoshop Batch Action - Relative Positioning


Question

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).

2017/04/13
1
3
4/13/2017 12:46:00 PM

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

2013/01/01
5
1/1/2013 5:32:00 AM