Can I transform an image's location in a Photoshop action so that it's relative to the canvas and NOT the image?


I'm trying to create an action that will move a layer around the canvas. The problem is that my image won't always be the same size and neither will my canvas. If I record a transform and move my image to X:0px by Y:0px, Photoshop will record that the image moved (as an example) -54px to the left and -20px to the top.

This won't work for me because it's recording the steps based on where my image WAS. My image won't always be in the same starting location. So if I were to use this action on a different file where the image is located somewhere else on the canvas, -54px to the left and -20px to top may not bring it's upper left corner to 0px/0px on my canvas.

I hope I've explained this well enough. My main goal is to get an image layer, regardless of it's location on my canvas, moved to the top left 0px/0px of my canvas (also regardless of that canvases size).

Is there a way to accomplish this in Photoshop without resorting to a script?

12/6/2011 4:04:00 PM

Accepted Answer

As far as I know, there is no straight-forward way to do this in Photoshop. It's really easy to do in Illustrator, where the position of an object is just one of many parameters that you can edit in the toolbar.

That being said, it is possible in Photoshop, if not straight-forward. You need to use the alignment buttons that go with the Move Tool, and you need a second layer that is already positioned with its corner aligned where you want it.

In your case, since you only want to align your object to the top corner of the image, a background layer would work perfectly. Otherwise, you can create a new layer, fill the whole canvas, and then use this to align your object to.

Step by step:

  1. select the layer you want to align
  2. If you have no Background layer, you need to create a new layer, select the canvas, and fill the layer.
  3. Hold down CMD (Ctrl in Windows) and select the Background layer (or your new full-canvas layer)
  4. Select the Move Tool (V) and use the alignment tools in your toolbar to align the layer Alignment Tools
  5. You're done! Delete your alignment layer if necessary.

I created a quick Photoshop Action to walk you through it:

EDIT: read through the comments for a simpler method to achieving this, offered by Alan Gilbertson

12/9/2011 10:01:00 AM