Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

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

share|improve this question
    
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. –  plainclothes Dec 30 '12 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. –  Johannes Dec 30 '12 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. –  Lèse majesté Dec 30 '12 at 7:27
add comment

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

share|improve this answer
    
Very creative work-around. –  Johannes Dec 31 '12 at 2:43
    
Just added another suggestion from @visual28 on Twitter. It's a good one. –  Marc Edwards Jan 1 '13 at 5:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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